diff --git a/calc.c b/calc.c index 85f1466..1f1e40c 100644 --- a/calc.c +++ b/calc.c @@ -3,33 +3,35 @@ int main(){ FILE *fp = NULL; - int operand1, operand2; + double operand1, operand2; char operator = ' '; - int result, line = 0; + double (*result)(double, double); + double line = 0; fp = fopen("read.txt","r"); if(fp!=NULL){ - fscanf(fp, "%d", &line); + fscanf(fp, "%lf", &line); for(int i=0; i