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