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

Explain the concept of exceptions in .net environment, VB. Net & XML 1....

VB. Net & XML 1. Design a form based applications using labels, text boxes, and buttons to perform basic arithmetic operations on integers. 2. Explain the concept of Excepti

Software development life cycles, Explain different software development li...

Explain different software development life cycles. The System Development Life Cycle (SDLC) is the overall process of developing information systems through multi stage proces

Want a database management app, Project Description: Overview: Prepar...

Project Description: Overview: Prepare Windows program that runs in the background and on start up on the client's computer that grabs CERTAIN data from a.SDF file (SQL Serve

Globalization, how to access global resource file using javascript

how to access global resource file using javascript

Develop a desktop - windows project, Project Description: The software i...

Project Description: The software is developed to help individuals train both their subconscious and conscious mind so they can improve their life and get more success. - How

Explain how the server control validation controls works, Briefly explain h...

Briefly explain how the server control validation controls work? A validation control works by evaluating the value of an input server control on the page to see whether it mee

Code for the file dependency in cache, Show the code for the file dependenc...

Show the code for the file dependency in cache? Partial Class Default_aspx Public Sub displayAnnouncement() Dim announcement As String If Cache("announcement") Is Noth

Mvc completing backend solution, ASP.NET/MSSQL/ MVC completing backend solu...

ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. - repost Project Description: System is used for tracking company's activities through several pro

Explain MVC, Explain MVC and how it is diffrennt from Asp.net

Explain MVC and how it is diffrennt from Asp.net

Samba pos development customisation english version, Project Description: ...

Project Description: customise samba pos. Just remove samba pos logo and rebrand it. The title in the frame needs to be changed as well as the splash screen at the beginning.

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