Изменил(а) на 'du3/program.c'
This commit is contained in:
parent
e529ce698b
commit
f9c31abf43
@ -17,11 +17,19 @@ int main(){
|
|||||||
float vysl = 0;
|
float vysl = 0;
|
||||||
int counter = -1;
|
int counter = -1;
|
||||||
float h = 0;
|
float h = 0;
|
||||||
|
int pos = 0;
|
||||||
//float p = 0;
|
//float p = 0;
|
||||||
while(stop == 0){
|
while(stop == 0){
|
||||||
r = fgets(riadok,LINE_SIZE,stdin);
|
r = fgets(riadok,LINE_SIZE,stdin);
|
||||||
|
pos++;
|
||||||
if (r == NULL || !isdigit(*r)) {
|
if (r == NULL || !isdigit(*r)) {
|
||||||
stop = 1;
|
if(*r == 13){
|
||||||
|
stop = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", pos);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
r2 = atof(riadok);
|
r2 = atof(riadok);
|
||||||
mass[i] = r2;
|
mass[i] = r2;
|
||||||
|
Loading…
Reference in New Issue
Block a user