Program for solution of linear equations - c# program, DOT NET Programming

Assignment Help:

Program for Solution of Linear Equations - C# Program

Hello, I've been trying so many codes for this but those codes didn't work well. Please write a Program for solving Linear Equation in c#.


Related Discussions:- Program for solution of linear equations - c# program

Prepare one web based application, I want to prepare one web based applicat...

I want to prepare one web based application which have student registration and according to semester and every time it will change as per semester change according, now student ge

Mat lab programming, MAT LAB programming Project Description: i have ...

MAT LAB programming Project Description: i have simulation and i need to simulate the equation in ,and test the all simulation it working with your work program other code sh

Payroll managment, how can i construct er diagram for payroll managment

how can i construct er diagram for payroll managment

Software bot for domain parking, I have 10 domains which are presently park...

I have 10 domains which are presently parked, now I need a software/Bot which generate clicks on the ads placed on the website. These clicks which are generated should use proxy to

I need online real commission management system, I need Online Real Commiss...

I need Online Real Commission Management system Project Description: Real Estate -- Store and retrieve Purchase plot customers, Employee to refer the customers get commiss

What is cts and cls, What is CTS and CLS? => CLS stands for common lang...

What is CTS and CLS? => CLS stands for common language specification where as CTS stands for common type system. => CLS : cls is a standard for .net . cls is small set of sp

Web server connections, Question 1 Discuss the following with respect to ....

Question 1 Discuss the following with respect to .NET Technologies Web Applications Web Server Connections Question 2 Write a sample program using ASP.NET explain

What is the use of a .disco file, What is the use of a .disco file? A c...

What is the use of a .disco file? A client application uses a .disco file to locate or discover the documents that have the description of a Web service. The .disco file having

Mailer - mail sender, mailer - mail sender Project Description: I wan...

mailer - mail sender Project Description: I want a mailer: -run on Windows Server 2008 -use how many theard i need -more details speak on private Skills required

What happens when aspx page is requested from browser ?, The steps that occ...

The steps that occur when we request a ASPX page are as follows:- 1) The browser sends the request to the webserver. Now  assume that the webserver at the other end is IIS. 2

Aana

2/11/2013 7:59:14 AM

Hope this code will help you in finding solution of your problem.

Program:

using System;  

class LinearEquations

{

  public static void Main()

 {

   int response;

   float a,b,c,d,m,n, temp;

   double x1,x2;  

  EnterNewValuesAgain:  

  Console.WriteLine(""); // Blank Line

  Console.WriteLine(" ** Linear Equation **** ");

  Console.WriteLine(""); // Blank Line

   // Reading the value of a

  Console.Write("Enter the value of a : ");

  a = float.Parse(Console.ReadLine());                         // Reading the value of b

  Console.Write("Enter the value of b : ");

  b = float.Parse(Console.ReadLine());                        // Reading the value of c

  Console.Write("Enter the value of c : ");

  c = float.Parse(Console.ReadLine());                         // Reading the value of d

  Console.Write("Enter the value of d : ");

  d = float.Parse(Console.ReadLine());  

     temp = a*d - b*c;  

   if (temp == 0)

   {

   Console.WriteLine(""); // Blank Line

   Console.WriteLine("The denominator equals to zero (0); Cannot proceed

further ...");

   Console.Write("Do You want to enter new values (1 For Yes / 0 For No) ?

");

   response = int.Parse(Console.ReadLine());

  if (response == 0) 

   {

     goto Exit;

   }

    else

   {

     goto EnterNewValuesAgain;

   }   }

    else

   {    // Reading the value of m

   Console.Write("Enter the value of m : ");

   m = float.Parse(Console.ReadLine());

Alice

2/11/2013 8:03:08 AM

I think the above code is incomplete. please try to use this after the above code.

   Console.Write("Enter the value of n : ");

   n = float.Parse(Console.ReadLine());

   x1 = ((m*d) + (b*n))/((a*d) - (c*b));

   x2 = ((n*a) + (m*c))/((a*d) - (c*b));

   Console.WriteLine(""); // Blank Line

   Console.WriteLine("Value of x1 = " + x1);

   Console.WriteLine("Value of x2 = " + x2);

   Console.WriteLine(""); // Blank Line

   Console.Write("Do You want to enter new values (1 For Yes / 0 For No) ?

");

   response = int.Parse(Console.ReadLine());

    if (response == 0) 

   {

     goto Exit;

   }

    else

   {

     goto EnterNewValuesAgain;

   }

  }

  Exit:

   Console.WriteLine(""); // Blank Line

   Console.WriteLine("Thank You For using this small program ... :)");

  Console.ReadLine();}}

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd