Aktualizovat „a1/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-03-14 21:21:18 +00:00
parent 0a3ac9c5a6
commit 00eed37fdf

View File

@ -3,11 +3,11 @@
#include<math.h>
int main()
{
double x=0;
double value =0;
float x=0;
float value =0;
int count =0;
double arr[50];
while(scanf("%lF",&value)!=EOF){
float arr[50];
while(scanf("%f",&value)!=EOF){
if(isalpha(value)!=0){
return 0;
}
@ -23,7 +23,7 @@ int main()
for(int i =0;i<count-1;i++){
value+=arr[i]*pow(x,count-2-i);
}
printf("Vysledok je :%.2F\n",value);
printf("Vysledok je :%.2f\n",value);
return 0;