Aktualizovat „du4/program.c“
This commit is contained in:
parent
f8cd7b9890
commit
9006ab5b4e
@ -3,9 +3,9 @@
|
||||
int main(){
|
||||
char read[1000000];
|
||||
scanf("%[^\n]", read);
|
||||
int num1, num2, answer;
|
||||
float num1, num2, answer;
|
||||
char action;
|
||||
sscanf(read, "%d %c %d %*c %d", &num1, &action, &num2, &answer);
|
||||
sscanf(read, "%f %c %f %*c %f", &num1, &action, &num2, &answer);
|
||||
if(action != '/' && action != '*' && action != '-' && action != '+'){
|
||||
printf("CHYBA\n");
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user