0
I'm trying to make a simple calculator but my code has no output pls help
#include <stdio.h> int main() { int x, z; char y; scanf("%d", &x); scanf("%c", &y); scanf("%d", &z); if(y == '+') { printf("%d", x+z); } else if(y == '-') { printf("%d", x-z); } else if(y == '*') { printf("%d", x*z); } else if(y == '/') { printf("%d", x/z); } return 0; } ^^^ This is my code
4 Answers