fork download
  1. namespace Problem_10.Multiplication_Table_2._0
  2. {
  3. using System;
  4.  
  5. public class Program
  6. {
  7. public static void Main()
  8. {
  9. var number = int.Parse(Console.ReadLine());
  10. var multiplyCount = int.Parse(Console.ReadLine());
  11.  
  12. if(multiplyCount > 10)
  13. {
  14. Console.WriteLine($"{number} X {multiplyCount} = {number * multiplyCount}");
  15. return;
  16. }
  17.  
  18. for (int i = multiplyCount; i <= 10; i++)
  19. {
  20. Console.WriteLine($"{number} X {i} = {number * i}");
  21. }
  22. }
  23. }
  24. }
Runtime error #stdin #stdout #stderr 0.01s 134976KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: String
  at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00006] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00014] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Int32.Parse (System.String s) [0x00007] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Problem_10.Multiplication_Table_2._0.Program.Main () [0x00005] in <3f22b25ec0fd485c84aa27a50254559e>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null.
Parameter name: String
  at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00006] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Number.ParseInt32 (System.String s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00014] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Int32.Parse (System.String s) [0x00007] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Problem_10.Multiplication_Table_2._0.Program.Main () [0x00005] in <3f22b25ec0fd485c84aa27a50254559e>:0