Browse Source

Says the user's name and starts gameinstructions

main
fdlt3859 2 years ago
parent
commit
83f62f3b6e
  1. 7
      src/main/quizproject.c
  2. 1
      src/main/quizproject.h

7
src/main/quizproject.c

@ -19,10 +19,17 @@ void displayWelcomeMessage(void) {
char name[100] = {0};
printf("\t\t Please enter your First Name \n");
scanf("%s", name);
displayGameInstructions(name);
}
}
void displayGameInstructions(char name[]) {
printf("\t\t Hello %s \n\n", name);
printf("\t\t To start this game, here are the instructions\n\n");
}
int main(){
displayWelcomeMessage();

1
src/main/quizproject.h

@ -2,5 +2,6 @@
#define QUIZPROJECT_H
void displayWelcomeMessage(void);
void displayGameInstructions(char name[]);
#endif
Loading…
Cancel
Save