diff --git a/a1/program.c b/a1/program.c index 825dacf..ab559f8 100644 --- a/a1/program.c +++ b/a1/program.c @@ -6,18 +6,18 @@ int main() double x=0; long double value =0; int count =0; - double arr[50]={0}; + long double arr[50]={0}; scanf("%lf",&x); while(scanf("%Lf",&value)!=EOF){ - if(isalpha(value)!=0){ - return 0; - } - arr[count]=(double)value; + //if(isalpha(value)!=0){ + // return 0; + //} + arr[count]=value; count++; } value=0; for(int i =0;i=0;i++){ - value+=arr[i]*pow(x,count-1-i); + value+=(long double)(arr[i]*pow(x,count-1-i)); } if(value>=40000&&value<=1000000){