I am new to programming, and I just did this example out of my book. You pick the number, you get 6 trys, if you pick the right one you win. Anywho I want to game to repeat itself if you press Y. I know how to make the game exit if you press N. Is there C function to make the program repeat the main function?
Here is the scource code.
#define RANGE 100
#define TRIES 6
printf("GUESS!?!\nGuess the random number.\n");
printf("I'm thinking of a number between 1 and %i.\n",RANGE);
printf("Can you guess it in %i tries?\n",TRIES);
printf("You got it!\n");
printf("The answer was %i.\n",guessme);
// printf("Would you like to play again? Y/N?");
// else if getche(printf("\nPress any key to exit."));
int rnd(int range)