c=1;
for(j=a-1;j>=i;j--){
if(j==i) c=1*c;
else c=c*10;
}
o=o+(cd1[i+1]-48)*c; }
return(o);
}
int Count(int a,int b,char c){ int dd;
switch(c){
case '*':dd=a*b;break;
case '/':dd=a/b;break;
case '+':dd=a+b;break;
case '-':dd=a-b;break;
default :printf("Error!");
}
return(dd);
}
char compare(char a,char b){
if(a=='*'&&b=='/') return('>'); if(a=='/'&&b=='*') return('>'); if(a=='+'&&b=='-') return('>'); if(a=='-'&&b=='+') return('>'); if(a=='*'&&b=='+') return('>'); if(a=='*'&&b=='-') return('>'); if(a=='/'&&b=='+') return('>'); if(a=='/'&&b=='-') return('>'); if(a=='+'&&b=='*') return('<'); if(a=='+'&&b=='/') return('<'); if(a=='-'&&b=='*') return('<'); if(a=='+'&&b=='*') return('<'); if(a=='*'&&b=='(') return('<'); if(a=='/'&&b=='(') return('<'); if(a=='+'&&b=='(') return('<'); if(a=='-'&&b=='(') return('<'); if(a=='*'&&b==')') return('>'); if(a=='/'&&b==')') return('>'); if(a=='+'&&b==')') return('>'); if(a=='-'&&b==')') return('>'); if(a=='('&&b=='*') return('<'); if(a=='('&&b=='/') return('<'); if(a=='('&&b=='+') return('<'); if(a=='('&&b=='-') return('<'); if(a==')'&&b=='*') return('>'); if(a==')'&&b=='/') return('>'); if(a==')'&&b=='+') return('>'); if(a==')'&&b=='-') return('>'); if(a=='*'&&b==';') return('>'); if(a=='/'&&b==';') return('>'); if(a=='+'&&b==';') return('>'); if(a=='-'&&b==';') return('>'); if(a=='#'&&b=='*') return('<'); if(a=='#'&&b=='/') return('<'); if(a=='#'&&b=='-') return('<'); if(a=='#'&&b=='+') return('<');
if(a=='#'&&b==';') return('=');
if(a=='('&&b=='(') return('<');
if(a==')'&&b==')') return('>');
if(a==')'&&b=='#') return('>');
if(a=='*'&&b=='*') return('>');
if(a=='/'&&b=='/') return('>');
if(a=='+'&&b=='+') return('>');
if(a=='-'&&b=='-') return('>');
if(a=='('&&b==')') return('=');
if(a==')'&&b==';') return('>');
}
main()
{
FILE *fp,*fq;
char c1[100],c;
char chuan[100];
int c2[100],d,i=0,j=0,result,ii=0,a,b; clrscr();
fp=fopen("document1.txt","wr");
if(!fp) printf("Open File Error!");
else{
printf("Please Input biao da shi :\n");
while((c=getchar())!='#')
fprintf(fp,"%c",c);
fclose(fp);
cifa();
yufa();
if(check==10){
printf("yufa OK!");
fp=fopen("document1.txt","r");
fq=fopen("document3.txt","w");
if(!fq||!fp) printf("file not open!");
else{
fscanf(fp,"%c",&c);
fscanf(fp,"%c",&c);
while(c!=';'){
fscanf(fp,"%c",&c);
while(c!='+'&&c!='-'&&c!='*'&&c!='/'&