fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char op;
  5. int n1 = 3;
  6. int n2 = 2;
  7. scanf("%c\n%d\n%d", &op);
  8. int res ;
  9. if (res == '+'){
  10. res = n1 + n2;
  11. }
  12. else if (res == '-'){
  13. res = n1 -n2;
  14. }
  15. else if (res == '*'){
  16. res = n1 * n2;
  17. }
  18. else {
  19. res = 0;
  20. }
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0.01s 5284KB
stdin
+
stdout
Standard output is empty