Aktualizovat du3/program.c
This commit is contained in:
parent
7870d6c4ef
commit
9c4ee978e4
@ -31,6 +31,9 @@ int check(char* input) {
|
|||||||
char znak;
|
char znak;
|
||||||
int a=0;
|
int a=0;
|
||||||
a=sscanf(input, " %lf %c %lf = %lf ", &number1, &znak, &number2, &givenResult);
|
a=sscanf(input, " %lf %c %lf = %lf ", &number1, &znak, &number2, &givenResult);
|
||||||
|
if (input == NULL || strlen(input) == 0 || strspn(input, " \t\n") == strlen(input)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (a != 4) {
|
if (a != 4) {
|
||||||
return 0;
|
return 0;
|
||||||
}else {
|
}else {
|
||||||
|
Loading…
Reference in New Issue
Block a user