refresh
This commit is contained in:
parent
07d5261362
commit
56f932a1e5
BIN
du6/output/program.exe
Normal file
BIN
du6/output/program.exe
Normal file
Binary file not shown.
@ -91,21 +91,24 @@ static void run_dialog(TreeNode *root) {
|
||||
}
|
||||
|
||||
char c = 0;
|
||||
if (scanf(" %c", &c) != 1) {
|
||||
printf("Odpovedajte 'a' alebo 'n'\n");
|
||||
int r = scanf(" %c", &c);
|
||||
|
||||
if (r != 1) {
|
||||
printf("Koniec vstupu\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (c == 'a') {
|
||||
run_dialog(root->yes_branch);
|
||||
}
|
||||
else if (c == 'n') {
|
||||
run_dialog(root->no_branch);
|
||||
}
|
||||
else {
|
||||
printf("Nerozumiem\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == 'n') {
|
||||
run_dialog(root->no_branch);
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Nerozumiem\n");
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user