This commit is contained in:
Oleksandr Vyshniakov 2025-02-22 15:30:33 +01:00
parent 255f0ac94e
commit 722fa1607b
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
int read_number (double *num) {
char buffer[50];
if (!fgetc(buffer, sizeof(buffer), stdin)) { //если fgets не смог считать строку
if (!fgets(buffer, sizeof(buffer), stdin)) { //если fgets не смог считать строку
return 0;
}
@ -39,7 +39,7 @@ int main() {
double coef; //переменна для хранения считанного коэффициента
char buffer[50];//строковый буфер для fgetc
if (!fgetc(buffer, sizeof(buffer), stdin) || buffer[0] == '\n') {
if (!fgets(buffer, sizeof(buffer), stdin) || buffer[0] == '\n') {
break;
}

BIN
du2/program.exe Normal file

Binary file not shown.