fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text.RegularExpressions;
  5.  
  6. namespace HelloWorld
  7. {
  8. public class Program
  9. {
  10. public static void Main(string[] args)
  11. {
  12. float [] numbers={1,4,0,2};
  13. float div =0;
  14. try
  15. {
  16. div=numbers[0]/numbers [2];
  17. }
  18. catch(IndexOutOfRangeException e)
  19. {
  20. Console.WriteLine(e.Message);
  21. }
  22. catch(DivideByZeroException e)
  23. {
  24. Console.WriteLine(e.Message);
  25. }
  26. catch(Exception e)
  27. {
  28. Console.WriteLine("error trererererere ya ya ya ya");
  29. }
  30. finally
  31. {
  32. Console.WriteLine(div);
  33. }
  34. }
  35. }
  36. }
  37.  
Success #stdin #stdout 0.05s 30196KB
stdin
Standard input is empty
stdout