fork(5) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication13
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string input = Console.ReadLine();
  14.  
  15. int bufor = 0;
  16. double d = 0.0, r = 0.0;
  17. double result=0.0;
  18.  
  19. for (int i = 0; i < input.Length; i++)
  20. {
  21. if (input[i] == ' ')
  22. {
  23. bufor = i + 1;
  24.  
  25. r = double.Parse(input.Substring(0, bufor).Replace('.', ','));
  26. break;
  27. }
  28.  
  29. }
  30. d = double.Parse(input.Substring(bufor, input.Length - bufor).Replace('.', ','));
  31.  
  32. result = (((r*r)-((d*d)*0.25))* 3.141592654);
  33.  
  34. Console.WriteLine(Math.Round(result,2).ToString().Replace(',','.'));
  35. }
  36. }
  37. }
  38.  
Runtime error #stdin #stdout #stderr 0.01s 32744KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at ConsoleApplication13.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at ConsoleApplication13.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0