初学未入门者一个问题请教~~~~~
请各位帮忙,把程序修改小一点,原意不变~~~~~谢谢~~~~main()
{
int i;
printf("+input'1' -input'2' *input'3' /input'4'");
scanf("%d",&i);
if(i==1)
{
int a,b,c;
scanf("%d,%d",&a,&b);
c=a+b;
printf("=%d\n",c);
}
else
if(i==2)
{
int a,b,c;
scanf("%d,%d",&a,&b);
c=a-b;
printf("=%d\n",c);
}
else
if(i==3)
{
int a,b,c;
scanf("%d,%d",&a,&b);
c=a*b;
printf("=%d\n",c);
}
else
if(i==4)
{
int a,b,c;
scanf("%d,%d",&a,&b);
c=a/b;
printf("=%d\n",c);
}
else
if(i<1||i>=4)
printf("Please input afresh 1-4 of number!\n");
}