fork download
  1. using System;
  2.  
  3. public class Calculadora
  4. {
  5. public static void Main (string[] args)
  6. {
  7. int a = Convert.ToInt32( args[0] );
  8. int b = Convert.ToInt32( args[1] );
  9.  
  10. // Realiza operaciones aritméticas básicas
  11. Console.WriteLine ("La adición de {0} y {1} es {2}.", a, b, (a+b));
  12. Console.WriteLine ("La sustracción de {0} y {1} es {2}.", a, b, (a-b));
  13. Console.WriteLine ("El producto de {0} y {1} es {2}.", a, b, (a*b));
  14. Console.WriteLine ("El cociente de {0} y {1} es {2}.", a, b, (a/b));
  15. }
  16. }
Runtime error #stdin #stdout #stderr 0.03s 36344KB
stdin
5
3
stdout
Standard output is empty
stderr
Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.
  at Calculadora.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IndexOutOfRangeException: Array index is out of range.
  at Calculadora.Main (System.String[] args) [0x00000] in <filename unknown>:0