Question: i need a flow chart for this code in c Please give me a correct answer not on a software that generate it #include #include

i need a flow chart for this code in c Please give me a correct answer not on a software that generate it

#include #include

void startGuessTheNumberGame(); // define function

int main() { startGuessTheNumberGame(); } void startGuessTheNumberGame() // define function { int secretNumber ; int low = 1 ; int high = 10000 ; int menu2 ; int counter = 1 ; int Guess ; printf("Enter A Secret Number Between 1 and 10000 : "); scanf("%d", &secretNumber);

while(low <= high) { Guess = low + (high - low) / 2; printf(" My Guess is : %d", Guess) ; printf(" Please Choose One Of The Following 3 Options : 1.My Guess Is Correct. 2.The secret Number IS Larger Than %d", Guess) ; // print menu printf(". 3.2.The secret Number IS Smaller Than %d", Guess);

printf(" "); scanf("%d",&menu2); switch(menu2) { case 1 : printf("we take to find their secret number %d", counter); break;

case 2 : low = Guess + 1 ; break; case 3 : high = Guess - 1; break;

default : printf("your Choose is Invalid "); break ; }

if(menu2 == 1) // to exit the program { break ; // Exit the program } counter++;

} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!