Hello,i want my my program to look just like the one below the line: But i keep getting the same issue of the
void Instructions() coming before the Instruction; input (( i want it the other way around))

For example i keep getting(after compile):

I have a capital letter in mind. You have 6 chances to guess which letter
I am thinking. I will let you know if you are too high or too low.
Good luck!

Hello there!

Would you like to play a guessing game? Y

You entered Y. Let's play!

[i want it to look like the one below. can anybody help me please?]

Hello there!

Would you like to play a guessing game? Y

You entered Y. Let's play!

I have a capital letter in mind. You have 6 chances to guess which letter
I am thinking. I will let you know if you are too high or too low.
Good luck!

Guess number 1: A
I am sorry but your guess is too LOW.

Guess number 2: Z
I am sorry but your guess is too HIGH.

Guess number 3: B
I am sorry but your guess is too LOW.

Guess number 4: C
I am sorry but your guess is too LOW.

Guess number 5: Y
I am sorry but your guess is too HIGH.

Guess number 6: X
I am sorry but your guess is too HIGH.

It looks like you have run out of guesses. I am sorry, but you lose!

The letter I had in mind was M.

Goodbye for now.

My Code:

#include<stdio.h> 
#define _CRT_SECURE_NO_WARNINGS 
#define MAX_GUESSES 6 


int main() 
{ 

char answer; 

Instructions(); 
//1. Greet the user and ask if they would like to play a guessing game. 
printf("\nHello there!\nWould like to play a guessing game?Enter Y or N: \n"); 
scanf(" %c", &answer); 

if(answer == 'y' || answer == 'Y') 
printf("You entered Y. Let's play!"); 
{ 
do{ 

}while (answer == 'y' || answer == 'Y'); 
} 
printf("\nMaybe next time.\n"); 
printf("\nGoodBye for now.\n"); 
return -1; 
} 


void Instructions() 
{ 
printf("I have a capital letter in mind. You have 6 chances to guess which letter I am \nthinking. I will let you know if you are too high or too low.\n"); 
printf("After each guess, you will be informed if your guess is too high or too low.\nGood luck!\n"); 

} 

move line 11 down between lines 17 and 18.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.