Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2006, 11:02 PM
Registered User
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to wilsonxue
Default urgent help

hello group
hi, i am a beginner, i do a program to work equation but it cannot work well,
i need your help ,thank you very much.




using System;
using System.Globalization;
namespace ConsoleApplication2
{
        class Class1
    {


        static void Main(string[] args)
        {

        {
            int i, j, k;
            double client, temp = 0.0;
            double[,] a=new double[3,4];
            int n=3;






            ///matrix a
            for (i = 0; i < 3; i++)
            {
                for (j = 0; j < 4; j++)
                {
                    a[i,j]=(i+2)*(i+3)+1;
                }
            }




            for(k = 0; k < n - 1; k++)
            {
                for(i = k + 1; i < n; i++)
                {
                    client = a[i,k]/a[k,k];
                    for(j = k + 1; j < n; j++)
                        a[i,j] = a[i,j] - client * a[k,j];

                    a[i,n] = a[i,n] - client * a[k,n];
                }
            }

            //the last unknown value
            a[n - 1,n] = a[n - 1,n]/a[n - 1,n - 1];
        {
            for(i = n - 2; i >= 0; i--)
            {
                for (j = i + 1; j < n; j++)
                    temp += a[i,j] * a[j,n];
                a[i,n] = (a[i,n] - temp) / a[i,i];
            }


            for(i = 0; i < n; i++)
                Console.Write(a[i,n]+"\t");//output }
            Console.WriteLine();
        }
            Console.ReadLine();


        }
    }
}

 
Old July 12th, 2006, 06:05 PM
Authorized User
 
Join Date: May 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What are you trying to do? What is the goal of the program?

Brandon





Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent deb_kareng ASP.NET 2.0 Professional 1 August 13th, 2007 07:29 AM
it's urgent deb_kareng ASP.NET 2.0 Professional 3 August 7th, 2007 07:40 AM
urgent help yash_coolbuddy_forindia BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 May 7th, 2007 08:40 AM
urgent???????????? nsr35 Beginning VB 6 1 October 3rd, 2005 10:57 AM
urgent ??????????????? nsr35 Pro VB Databases 0 October 3rd, 2005 04:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.