This commit is contained in:
Damián Korpesio 2021-10-14 17:29:39 +02:00
parent 1f4f88feac
commit 3b4e248bf6

View File

@ -20,10 +20,7 @@ int main() {
int i = 0; int i = 0;
int c; int c;
int d; int d;
float pred;
float cena; float cena;
char strpred[LINESIZE];
memset(strpred,0,LINESIZE);
while (fgets(line, LINESIZE, stdin)) { while (fgets(line, LINESIZE, stdin)) {
velkost = strlen(line); velkost = strlen(line);
if (velkost == 1 && line[velkost - 1] == '\n') { if (velkost == 1 && line[velkost - 1] == '\n') {
@ -37,6 +34,9 @@ int main() {
} }
else if (i == 1){ else if (i == 1){
cena = atof(line); cena = atof(line);
if (cena == 0.0){
break;
}
jedalny_listok[a].prize = cena; jedalny_listok[a].prize = cena;
i--; i--;