diff --git a/c/a.out b/c/a.out index c1d6fe4..5bf44bf 100755 Binary files a/c/a.out and b/c/a.out differ diff --git a/c/test.c b/c/test.c index db01270..c611fdd 100644 --- a/c/test.c +++ b/c/test.c @@ -1,5 +1,18 @@ #include +#include int main(void) { - printf("Hello, World!\n"); - return 0; + int lives = 7; + int questions = 20; + for (int i = 0;i < questions; i++) { + printf("You have %d lives left\n", lives); + printf("Question %d: What is 2 + 2?\n", i + 1); + int answer; + scanf("%d", &answer); + if (answer == 4) { + printf("Correct!\n"); + } else { + printf("Incorrect!\n"); + lives--; + } + } }