This commit is contained in:
Yaroslav Orlianskyi 2022-03-30 22:09:48 +02:00
parent c169f36d39
commit c14740c2b8
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -3,14 +3,13 @@
int main(){ int main(){
int c[2]; int c[2];
int a, i = 0; int a = 0;
int vysledok; int vysledok;
char riadok[999]; char riadok[999];
char *endptr = NULL; char *endptr = NULL;
bool first = true; bool first = true;
bool second = false; bool second = false;
while(1){ while(1){
a++;
char* r = fgets(riadok,999,stdin); char* r = fgets(riadok,999,stdin);
if(*r == '\n'){ if(*r == '\n'){
break; break;
@ -33,8 +32,9 @@ int main(){
second = true; second = true;
continue; continue;
}else{ }else{
float v = strtod(riadok,&endptr); int v = strtod(riadok,&endptr);
c[i++] = v; c[a] = v;
a = a + 1;
continue; continue;
} }
} }