diff --git a/du3/program.c b/du3/program.c index 50d6f17..beade40 100644 --- a/du3/program.c +++ b/du3/program.c @@ -13,9 +13,9 @@ int stop = 0; char mass[LINE_SIZE]; int i = 0; int x = 0; -int vysl = 0; +float vysl = 0; int counter = -1; -int h = 0; +float h = 0; while(stop == 0){ r = fgets(riadok,LINE_SIZE,stdin); assert(r!=NULL); @@ -36,7 +36,7 @@ h = mass[j]; //printf("%d ", h); if(j != 0){ if(counter != 0){ -vysl += h * pow(x,counter); +vysl += h * powl(x,counter); } else{ vysl += h;