Вот проверенная программа. Работает правильно
Код:
#include<stdio.h>
#include<conio.h>
main(){
int a,b;
char c;
printf("Vvedite tseloe chislo ");
scanf("%d", &a);
printf("Vvedite operatsiy ");
scanf("%s", &c);
printf("Vvedite tseloe chislo ");
scanf("%d", &b);
switch(c){
case '+': printf("%d %c %d = %d\n", a, c, b, a+b); break;
case '-': printf("%d %c %d = %d\n", a, c, b, a-b);
}
getch();
}