For Loop - Challenge - 5 iterations

This is the section of my code I used the for loop in:

int main()
{

	PrintIntro();
	
	//Guessing the word
	int NumberOfGuesses = 5;
	for (int loop = 1; loop <= NumberOfGuesses; loop++)
	{
		GetGuessAndPrintBack();
	}

	std::cout << std::endl;

	return 0;
}

When tested, it worked successfully and asked me for a guess five times.

Thanks for sharing this. Keep up the great work.

Privacy & Terms