fork download
  1. //This is my CSharp language program
  2. using System;
  3. public class MyLab
  4. {
  5. public static void Main()
  6. {
  7. double x=0.0;
  8. double y=0.0;
  9. double z=0.0;
  10. double z1,z2,z3,z4,z5=0.0;
  11. Console.WriteLine("Please enter value for X\n");
  12. x=double.Parse(Console.ReadLine());
  13. Console.WriteLine("Please enter value for Y\n");
  14. y=double.Parse(Console.ReadLine());
  15. Console.WriteLine("x=\n"+x);
  16. Console.WriteLine("y=\n"+y);
  17. z1=Math.Pow(y, x);
  18. z2=Math.Abs(x);
  19. z3=Math.Abs(y);
  20. z4= z2 + z3;
  21. z5=Math.Sqrt(z4);
  22. z=z1 + z5;
  23. Console.WriteLine("Final result is z="+z);
  24. }}
  25.  
Success #stdin #stdout 0.06s 30336KB
stdin
-0.851
1.250
stdout
Please enter value for X

Please enter value for Y

x=
-0.851
y=
1.25
Final result is z=2.276528501423555