I need to make a Console Application which can calculate the values of the Constants " X " and " Y " for the 2 equations ( ax + by = c) and ( dx + ey = f ) .. Of Course the program will ask the user to enter the values for the variables ( a , b , c , d , e , f ). I've tried to make some code, but got stuck at the core of the code. Would anybody please help me?
my Code:
Code:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace _1st_Exercise { class Program { static void Main(string[] args) { //Getting the constants Console.WriteLine("\"dx + ey = f\" ,, \"ax +by = c\"\n"); Console.WriteLine("Please enter\n"); Console.Write("F= "); int F; F = Convert.ToInt32(Console.ReadLine()); Console.Write("\nE= "); int E; E = Convert.ToInt32(Console.ReadLine()); Console.Write("\nD= "); int D; D = Convert.ToInt32(Console.ReadLine()); Console.Write("\nC= "); int C; C = Convert.ToInt32(Console.ReadLine()); Console.Write("\nB= "); int B; B = Convert.ToInt32(Console.ReadLine()); Console.Write("\nA= "); int A; A = Convert.ToInt32(Console.ReadLine()); //Code core int x; x = (A - D); int y; y = (B - E); //Output Console.WriteLine("\n\nX = " + x ); Console.WriteLine("\nY = " + y ); //Exit program Console.WriteLine("\n\nPress any key to exit"); Console.ReadKey(); } } }