Aktualizovat „a1/program.c“
This commit is contained in:
parent
636badf2ca
commit
88df510aac
10
a1/program.c
10
a1/program.c
@ -7,12 +7,14 @@ int main()
|
|||||||
long double value =0;
|
long double value =0;
|
||||||
int count =0;
|
int count =0;
|
||||||
long double arr[50]={0};
|
long double arr[50]={0};
|
||||||
|
|
||||||
scanf("%lf",&x);
|
scanf("%lf",&x);
|
||||||
|
if(isalpha(x)!=0){
|
||||||
|
printf("Nepodarilo sa nacitat x\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
while(scanf("%Lf",&value)!=EOF){
|
while(scanf("%Lf",&value)!=EOF){
|
||||||
if(isdigit(value)==0){
|
|
||||||
printf("Nepodarilo sa nacitat x\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
arr[count]=value;
|
arr[count]=value;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user