fork download
  1. using System; // funx.cs
  2. namespace funx1 { class funx2
  3. { static void Main(string[] args)
  4. { double x = 90; // rextester.com/PYG11940
  5. Console.WriteLine("{0} {1}", x, funx(x));
  6. Console.ReadKey();
  7. }
  8.  
  9. public static double funx(double x)
  10. { double rad,a,b,c,d,e,f,funx;
  11. rad = x * Math.PI / 180;
  12. a = Math.Pow (x,1/4);
  13. b = Math.Sqrt(x); // Console.WriteLine(b);
  14. c = Math.Cos(rad); Console.WriteLine(c);
  15. d = Math.Log10(x); // Console.WriteLine(d);
  16. e = Math.Exp(b);
  17. f = Math.Log10(b) * Math.Log(e);
  18.  
  19. return funx = a + b + c + d + e + f;
  20. }
  21. }}
  22.  
Runtime error #stdin #stdout #stderr 0.11s 34840KB
stdin
Standard input is empty
stdout
6.123233995736766E-17
90  13206.6829321133
stderr
Unhandled exception. System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.
   at System.ConsolePal.ReadKey(Boolean intercept)
   at System.Console.ReadKey()
   at funx1.funx2.Main(String[] args) in /home/ZoHI8u/Project/Program.cs:line 6