public static void Main()
{ Console.WriteLine("C H O I C E");
Console.WriteLine("1 Calculate distance between two coordinates.");
Console.WriteLine("2 Calculate the midpoint.");
Console.WriteLine("3 Calculate the slope through two coordinates");
{ Console.WriteLine("How many questions you want to check ?");
int q = Convert.ToInt32(Console.ReadLine());
{ Console.WriteLine("Enter the coordinates x1, x2, y1, y2.");
double x1= Convert.ToInt32(Console.ReadLine());
double x2= Convert.ToInt32(Console.ReadLine());
double y1= Convert.ToInt32(Console.ReadLine());
double y2= Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your choice (1,2,3)");
int choice= Convert.ToInt32(Console.ReadLine());
x=((x1-x2)*(x1-x2)+(y2-y1)*(y2-y1));
Console.WriteLine(Distance);
Console.WriteLine("Is the answer verified ? Yes/No");
string ans = Console.ReadLine();
Console.WriteLine("The first coordinate of the midpoint is :" + MP1 ); Console.WriteLine("The second coordinate of midpoint is :" + MP2);
Console.WriteLine("Is the answer verified ?");
string ans = Console.ReadLine();
slope = ((y2-y1)/(x2-x1));
Console.WriteLine(slope);
Console.WriteLine("Is the answer verified ?");
string ans = Console.ReadLine();
Console.WriteLine("Number of right answers is"+" " + C);
Console.WriteLine("Number of incorrect answers "+IC);
Console.WriteLine("Percentage "+ per);} }