diff --git a/a1/program.c b/a1/program.c index 0a8cc28..fb64c0f 100644 --- a/a1/program.c +++ b/a1/program.c @@ -7,21 +7,21 @@ int main() float value =0; int count =0; float arr[50]; + scanf("%f",&x); while(scanf("%f",&value)!=EOF){ if(isalpha(value)!=0){ return 0; } - if(count !=0){ - arr[count-1]=value; - } - else{ - x=value; - } + arr[count]=value; count++; } value=0; - for(int i =0;i=40000){ + value =((int)(value*100 - 0.5)/100.00); } printf("Vysledok je :%.2f\n",value);