diff --git a/a1/program.c b/a1/program.c index 1b1d3e6..b4b9774 100644 --- a/a1/program.c +++ b/a1/program.c @@ -7,12 +7,14 @@ int main() long double value =0; int count =0; long double arr[50]={0}; + scanf("%lf",&x); + if(isalpha(x)!=0){ + printf("Nepodarilo sa nacitat x\n"); + return 0; + } while(scanf("%Lf",&value)!=EOF){ - if(isdigit(value)==0){ - printf("Nepodarilo sa nacitat x\n"); - return 0; - } + arr[count]=value; count++; }