Update 'du4/program.c'
This commit is contained in:
parent
6eedd49d95
commit
927ff558af
@ -15,16 +15,16 @@ int main() {
|
|||||||
|
|
||||||
while (*start != '\n') {
|
while (*start != '\n') {
|
||||||
if (*start == '+' || *start == '-' || *start == '*' || *start == '/') {
|
if (*start == '+' || *start == '-' || *start == '*' || *start == '/') {
|
||||||
if (has_operator) {
|
|
||||||
printf("CHYBA\n");
|
|
||||||
goto next_line;
|
|
||||||
}
|
|
||||||
has_operator = 1;
|
has_operator = 1;
|
||||||
op = *start;
|
op = *start;
|
||||||
} else if ((*start < '0' || *start > '9') && *start != ' ' && *start != '=' && *start != '.') {
|
} else if ((*start < '0' || *start > '9') && *start != ' ' && *start != '=' && *start != '.') {
|
||||||
goto next_line;
|
goto next_line;
|
||||||
}
|
}
|
||||||
start++;
|
start++;
|
||||||
|
|
||||||
|
if (!has_operator) {
|
||||||
|
printf("CHYBA\n");
|
||||||
|
goto next_line;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!has_operator) {
|
if (!has_operator) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user