This commit is contained in:
ada-dmitry
2023-12-27 16:42:11 +03:00
parent 133d1abffa
commit cace5b7d76
3 changed files with 10 additions and 6 deletions
+7
View File
@@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}
+3 -6
View File
@@ -117,7 +117,7 @@ R - начать поиск на другом отрезке: \n");
// Очистка стандартного потока ввода от "лишних"
__fpurge(stdin);
choice = getchar();
// scanf("%c", &choice); // Запись буквы, введенной пользователем в переменную choice.
switch (choice)
{
case 'C': // Выбор вида "Продолжить вычисление".
@@ -303,12 +303,9 @@ double read_parse(char ch)
{
char input[50];
double number;
__fpurge(stdin);
fgets(input, sizeof(input), stdin);
__fpurge(stdin);
int i = 0;
bool is_valid = true;
bool has_dot = false;
@@ -330,7 +327,7 @@ double read_parse(char ch)
}
}
// Проверка символов, формирующих цифры числа
while (input[i] != '\0')
while (input[i] != '\n')
{
if (is_digit(input[i]))
{
Binary file not shown.