Aktualizovat „a1/program.c“
This commit is contained in:
parent
a3224fc972
commit
028aeecd5f
@ -4,11 +4,11 @@
|
||||
int main()
|
||||
{
|
||||
double x=0;
|
||||
long double value =0;
|
||||
double value =0;
|
||||
int count =0;
|
||||
long double arr[50];
|
||||
double arr[50];
|
||||
scanf("%lf",&x);
|
||||
while(scanf("%Lf",&value)!=EOF){
|
||||
while(scanf("%lf",&value)!=EOF){
|
||||
if(isalpha(value)!=0){
|
||||
return 0;
|
||||
}
|
||||
@ -16,7 +16,7 @@ int main()
|
||||
count++;
|
||||
}
|
||||
value=0;
|
||||
for(int i =0;i<count;i++){
|
||||
for(int i =0;i<count-1;i++){
|
||||
value+=arr[i]*pow(x,count-1-i);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user