#include #include #include #include void add(double a, double b, double c,char ac, int result[],int count){ float cc=a+b; if(cc==(float)c || a+b==c) result[count]=1; else result[count]=2; } double subtr(double a, double b, double c,char ac, int result[],int count){ if(a-b==c) result[count]=1; else result[count]=2; } double multi(double a, double b, double c,char ac, int result[],int count){ if(a*b==c) result[count]=1; else result[count]=2; } double divi(double a, double b, double c,char ac, int result[],int count){ float cc=a/b; double Cc=(int)((a/b)*100000); if(Cc==c || a/b==c || cc==(int)(c*100000)) result[count]=1; else result[count]=2; } int main() { char *str; int *result; result=(int*)malloc(100); double a,b,c; char ac,el=0; int count=0; int eof; for(;eof!=EOF;count++){ str=(char*)malloc(20); eof=scanf("%s",str); int ind=0; for(int i=0;i