fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Text.RegularExpressions;
  6. using System.Threading.Tasks;
  7.  
  8. namespace Practice
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. int numberofrows = Int32.Parse(Console.ReadLine());
  15. for (int i = 0; i < numberofrows; i++)
  16. {
  17. string[] splitinput = Console.ReadLine().Split(' ');
  18. int[] convertedinput = Array.ConvertAll(splitinput, Convert.ToInt32);
  19. int sumofnumbers = 0;
  20. foreach (int value in convertedinput)
  21. {
  22. sumofnumbers += value;
  23. }
  24. Console.WriteLine(sumofnumbers+" ");
  25. }
  26.  
  27. Console.ReadLine();
  28.  
  29. }
  30. }
  31. }
Runtime error #stdin #stdout #stderr 0.04s 27112KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Unhandled Exception:
System.ArgumentNullException: Argument cannot be null.
Parameter name: s
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at Practice.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument cannot be null.
Parameter name: s
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at Practice.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0