Hi i am re-studying C.So I just wanted to do a simple calculator program.I am using dev-c++ anyways the code is below please help.
#include <stdio.h>
#include <conio.h>
/*its a simple program that after getting the numbers from the user and inputs the
operation*/
int main()
{
int i=0;
int a=0;
int b=0;
int s=0;
char o;
while(i==i){ /*a simple for-ever loop*/
printf("Enter the first number");
scanf("%d",&a);
printf("Enter the second number");
scanf("%d",&b);
printf("What do you want to do with them?");
scanf("%c",o);
switch(o)
{
case '+': s=a+b;
printf("\n The sum is : %d" ,s);
scanf("");
break;
default :
printf("\n invalid");
scanf("");
break;
}
}
}