fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. //llave main
  6.  
  7. float num1;
  8. float num2;
  9. int opcion;
  10.  
  11. printf("\nIntroduce el primer numero");
  12. scanf("%f",&num1);
  13.  
  14. printf("\Introduce el segundo numero");
  15. scanf("%f",&num2);
  16.  
  17. printf("\nEscoge una opcion (1,2,3,4):");
  18. printf("\n 1 : Sumar");
  19. printf("\n 2 : Restar");
  20. printf("\n 3 : Multiplicar");
  21. printf("\n 4 : Dividir");
  22. scanf("%d",&opcion);
  23.  
  24. switch(opcion) { //llave opciones
  25.  
  26. case 1:
  27.  
  28. printf("\n la suma es: %f",num1+num2);
  29. break;
  30.  
  31. case 2:
  32.  
  33. printf("\n la resta es: %f",num1-num2);
  34. break;
  35.  
  36. case 3:
  37. printf("\n la multiplicación es: %f",num1*num2);
  38. break;
  39.  
  40. case 4:
  41. printf("\nla división es : %f", num1/num2);
  42. break;
  43. //llave opciones }
  44. //llave main }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1 3 1
compilation info
prog.c: In function 'main':
prog.c:14:8: warning: unknown escape sequence: '\I'
 printf("\Introduce el segundo numero");
        ^
prog.c:42:2: error: expected declaration or statement at end of input
  break;
  ^
prog.c:42:2: error: expected declaration or statement at end of input
stdout
Standard output is empty