From 742a038d84fc41f3ef2cca2fcad63cd12ca58d59 Mon Sep 17 00:00:00 2001 From: fdlt3917 Date: Tue, 31 Jan 2023 13:33:25 +0000 Subject: [PATCH] million game - valid response loop --- src/main/quizproject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/quizproject.c b/src/main/quizproject.c index 900e6fc..80512f0 100644 --- a/src/main/quizproject.c +++ b/src/main/quizproject.c @@ -609,6 +609,8 @@ void play_milliongame() { printf("%s\n",answers[million_i][j]); } + point_one: + printf("Enter a valid Response: "); scanf(" %c", &million_user_answers[million_i]); million_user_answers[million_i] = toupper(million_user_answers[million_i]); @@ -627,7 +629,7 @@ void play_milliongame() { printf("\nYou inputed %c\n", million_user_answers[million_i]); break; default: - printf("\nInvalid Input\n"); + goto point_one; } million_i++;