So in my code you have to guess a number if you under or overestimate. How do I get the while loop to loop back to the input so you can input another number?
#include <stdio.h> int main(int argc, const char * argv[]) { int number = 45; printf("Please insert a number"); scanf("%d", &number); if (number == 45){ printf("good job! You got the number right."); return 0; } else if (number < 45){ while (number < 45 || number > 45){ printf("Your number is too low"); return 1; } } else if (number > 45){ printf("Your number is too high!"); return 1; } }
while (number != 45)...