fork(1) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7.  
  8. var pi = 3.14;
  9. var r = 10;
  10. var area = pi * r * r;
  11. var circum = 2 * pi * r;
  12.  
  13. Console.WriteLine("The area is {0}", area);
  14. Console.WriteLine("The circumfrence is {0}", circum);
  15.  
  16. Test t = new Test ();
  17. var rev = t.Reverse("Gray");
  18. Console.WriteLine(rev);
  19.  
  20. }
  21.  
  22. public string Reverse(string text)
  23. {
  24. string result = string.Empty;
  25. for(int i = text.Length - 1; i >= 0; i--)
  26. {
  27. result += text[i];
  28. }
  29. return result;
  30. }
  31. }
Success #stdin #stdout 0.04s 33872KB
stdin
Standard input is empty
stdout
The area is 314
The circumfrence is 62.8
yarG