Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is C programming (not C++) Please use horizontal & vertical spacing Write a

ID: 3625373 • Letter: T

Question

This is C programming (not C++) Please use horizontal & vertical spacing



Write a program that will ask the user to select an integer number in the range 1 – 100 (inclusive). Store this value in the int variable value.

Do Loop

Prompt the user to guess the random number. Tell the user that the

number is in the range 1 – 100.

Store the user input in the variable guess.

While (guess does not equal value) continue looping

Tell the user their guess was correct and thank them for using your program.

Exit your program with a return statement.

Explanation / Answer

//Here you go, it should work fine #include #include int main(void) { int number; int guess; do{ printf("Please enter a integer number in the range of 1-100(inclusive): "); scanf(" %d", &number); if(number100) { printf("Invalid number range, please reenter "); } }while(number100); printf(" "); do{ printf("Please guess the random number in the range of 1-100(inclusive): "); scanf(" %d", &guess); if(guess100) { printf("Invalid number range, please reenter "); } }while(guess!=number); printf("You guessed the number, thank you for using this program! "); system("pause"); return 0; }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote