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