Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 3:1de5b1ab5880
- Parent:
- 2:293f6bc54643
- Child:
- 4:979929c6d0b7
diff -r 293f6bc54643 -r 1de5b1ab5880 main.cpp
--- a/main.cpp Fri Mar 01 00:22:04 2019 +0000
+++ b/main.cpp Fri Mar 01 00:34:27 2019 +0000
@@ -126,6 +126,7 @@
printf("\n");
timeout.attach(&time_expired, 10.0);
int answer = get_answer();
+ if (answer!=0 && ret.size()<answer) answer = 0;
printf("Your answer: %d\n",answer);
if (answer!=0 && ret.at(--answer)==correct_answer) {
printf("CORRECT!\n");