mirror of
https://github.com/ada-dmitry/tmp_project.git
synced 2026-09-24 09:20:34 +00:00
meow 2.0
This commit is contained in:
Vendored
+7
@@ -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": []
|
||||||
|
}
|
||||||
@@ -117,7 +117,7 @@ R - начать поиск на другом отрезке: \n");
|
|||||||
// Очистка стандартного потока ввода от "лишних"
|
// Очистка стандартного потока ввода от "лишних"
|
||||||
__fpurge(stdin);
|
__fpurge(stdin);
|
||||||
choice = getchar();
|
choice = getchar();
|
||||||
// scanf("%c", &choice); // Запись буквы, введенной пользователем в переменную choice.
|
|
||||||
switch (choice)
|
switch (choice)
|
||||||
{
|
{
|
||||||
case 'C': // Выбор вида "Продолжить вычисление".
|
case 'C': // Выбор вида "Продолжить вычисление".
|
||||||
@@ -303,12 +303,9 @@ double read_parse(char ch)
|
|||||||
{
|
{
|
||||||
char input[50];
|
char input[50];
|
||||||
double number;
|
double number;
|
||||||
|
|
||||||
__fpurge(stdin);
|
|
||||||
|
|
||||||
fgets(input, sizeof(input), stdin);
|
fgets(input, sizeof(input), stdin);
|
||||||
|
|
||||||
__fpurge(stdin);
|
__fpurge(stdin);
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
bool is_valid = true;
|
bool is_valid = true;
|
||||||
bool has_dot = false;
|
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]))
|
if (is_digit(input[i]))
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user