void main()
{
double result;
char a;
FILE *data=fopen("61590_4.dat","at");
if(data==NULL)
data=fopen("61590_4.dat","wt");
if(data==NULL)
return;
NEXT:
token[n]=getchar();
result=exp();
if(token[n]=='\n')
{
token[n]='\0';
printf("%s=%g\n",token,result);
fprintf(data,"%s=%g\n",token,result);
}
else error();
printf("按Y继续,按N结束\n");
while(true)
{
a = getch();
if (a == 'y')
{
system("cls");
goto NEXT;
}
else if (a == 'n')
return;
}
fclose(data);
}