fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. public static class Program
  6. {
  7. private static void Main()
  8. {
  9. string a = Console.ReadLine();
  10. string b = Console.ReadLine();
  11. string c = Console.ReadLine();
  12.  
  13. try
  14. {
  15. int suma = int.Parse(a) + int.Parse(b) + int.Parse(c);
  16. Console.WriteLine(suma);
  17. }
  18. catch (FormatException)
  19. {
  20. Console.WriteLine("format exception, exit");
  21. }
  22. catch (ArgumentException)
  23. {
  24. Console.WriteLine("argument exception, exit");
  25. }
  26. catch (OverflowException)
  27. {
  28. Console.WriteLine("overflow exception, exit");
  29. }
  30. catch (Exception)
  31. {
  32. Console.WriteLine("non supported exception, exit");
  33. }
  34. }
  35. }
Success #stdin #stdout 0.02s 25264KB
stdin
1
2
stdout
argument exception, exit