Aktualizovat „a1/program.c“
This commit is contained in:
parent
0a3ac9c5a6
commit
00eed37fdf
10
a1/program.c
10
a1/program.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user