新手这样做的!!
#include<stdio.h>main()
{
loop: float a,b,sum;
char c,x;
scanf("%f%c%f",&a,&c,&b);
getchar();
{
if(c=='+')
printf("sum=%f",sum=a+b);
else if (c=='-')
printf("sum=%f",sum=a-b);
else if(c=='*')
printf("sum=%f",sum=a*b);
else if(b!=0&&c=='/')
printf("sum=%f",sum=a/b);
}
printf("\n");
printf("Do you want to continue?y/n");
if(x=getchar()=='y')
goto loop;
else EOF;
}
多C多智慧,将C进行到底.........