fork download
  1. using System;
  2.  
  3. namespace check1
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int i;
  10. Console.Write("Enter a Number : ");
  11. i = int.Parse(Console.ReadLine());
  12. if (i % 2 == 0)
  13. {
  14. Console.Write("Entered Number is an Even Number");
  15. Console.Read();
  16. }
  17. else
  18. {
  19. Console.Write("Entered Number is an Odd Number");
  20. Console.Read();
  21. }
  22. }
  23. }
  24. }
Runtime error #stdin #stdout #stderr 0.02s 16260KB
stdin
Standard input is empty
stdout
Enter a Number : 
stderr
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: s
  at System.Int32.Parse (System.String s) [0x00003] in <6649516e5b3542319fb262b421af0adb>:0 
  at check1.Program.Main (System.String[] args) [0x0000f] in <ba01538574104275b5b5160bd1715ffd>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null.
Parameter name: s
  at System.Int32.Parse (System.String s) [0x00003] in <6649516e5b3542319fb262b421af0adb>:0 
  at check1.Program.Main (System.String[] args) [0x0000f] in <ba01538574104275b5b5160bd1715ffd>:0