using System; class c1011 { static int Main() { double x = 1.000002; double y = 1.000001; double z = 0.000002000003; double t1,t2,t3; t1=(x-y)*(x+y); t2=(x*x)-(y*y); t3=Math.Pow(x,2)-Math.Pow(y,2); Console.WriteLine(" x = {0:f20}",x); Console.WriteLine(" y = {0:f20}",y); Console.WriteLine(" Algebraic answer is 0.000002000003"); Console.WriteLine(" (x-y)*(x+y) is {0:f20}",Math.Abs(t1)); Console.WriteLine(" Absolute error {0:f20}",Math.Abs((z-t1))); Console.WriteLine(" Relative error {0:f20}",Math.Abs((z-t1)/z)); Console.WriteLine(" Relative % error {0:f20}",Math.Abs(((z-t1)/z)*100)); Console.WriteLine(" Algebraic answer is 0.000002000003"); Console.WriteLine(" (x*x)-(y*y) {0:f20}",t2); Console.WriteLine(" Algebraic answer is 0.000002000003"); Console.Write("((Math.Pow(x,2))-(Math.Pow(y,2)))"); Console.WriteLine(" is {0:f20}",t3); return 0; } }