using System; class c1010 { static int Main() { float x = 1.002f; float y = 1.001f; float z = 0.002003f; float t1,t2,t3; t1=(x-y)*(x+y); t2=(x*x)-(y*y); t3=(float)((Math.Pow(x,2))-(Math.Pow(y,2))); Console.WriteLine(" x = {0:f10}",x); Console.WriteLine(" y = {0:f10}",y); Console.WriteLine(" Algebraic answer is 0.002003"); Console.WriteLine(" (x-y)*(x+y) is {0:f20}",t1); Console.WriteLine(" Absolute error {0:f20}",(z-t1)); Console.WriteLine(" Relative error {0:f20}",(z-t1)/z); Console.WriteLine(" Relative % error {0:f20}",((z-t1)/z)*100); Console.WriteLine(" Algebraic answer is 0.002003"); Console.WriteLine(" (x*x)-(y*y) {0:f20}",t2); Console.WriteLine(" Algebraic answer is 0.002003"); Console.Write("((Math.Pow(x,2))-(Math.Pow(y,2)))"); Console.WriteLine(" is {0:f20}",t3); return 0; } }