task5.c A Guessing Game Asking user to guess a number, only stop when the number is guessed correctly. */ #include #include int main() { printf("Guess a number from 1-10: "); return 0; } In task5.c...



task5.c

A Guessing Game

Asking user to guess a number, only stop when the

number is guessed correctly.

*/

#include

#include





int main()

{

    printf("Guess a number from 1-10: ");


    return 0;

}




In
task5.c, implement a simple guessing game. Your game will use rand() to generate a random number from 1 to 10 then prompt user to guess that number. User will have unlimited number of tries to guess the correct number. Your program should work like this:


Guess a number from 1-10: 1


Guess again: 4


Guess again: 2


Guess again: 9


Guess again: 10


Guess again: 6


You got it!



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here