#include
intmain()
{
inti,num1,num2,sum,count;
charch,op;
printf("123+-\n");
printf("456*/\n");
printf("789=#\n\n");
printf("0");
ch=getch();
while(ch"9")//輸入的不是數字,重新輸入
printf("\b%c",ch);
count=1;
num1=ch-"0";
while(ch=getch(),ch>="0"&&ch
putchar(ch);
num1=num1*10+ch-"0";
count++;
}
while(1)
op=ch;//符號
for(i=0;i
#include
#include
intmain()
{
inti,num1,num2,sum,count;
charch,op;
printf("123+-\n");
printf("456*/\n");
printf("789=#\n\n");
{
printf("0");
ch=getch();
while(ch"9")//輸入的不是數字,重新輸入
ch=getch();
printf("\b%c",ch);
count=1;
num1=ch-"0";
while(ch=getch(),ch>="0"&&ch
{
putchar(ch);
num1=num1*10+ch-"0";
count++;
}
while(1)
{
op=ch;//符號
ch=getch();
while(ch"9")//輸入的不是數字,重新輸入
ch=getch();
for(i=0;i