I've been reading Jumping into C++ by Alex Allain (really good for getting started with c++, I recommend checking it out if you haven't already)
But I'm on the practice problem where I make a program that does all the lyrics to "99 bottles of beer" and I think I've got it down, but I was just wondering if anyone knows how I could get the program wait a few seconds before looping again? Here is my code.
#include <iostream>
#include <string>
usingnamespace std;
int i = 99;
int main()
{
string txt(" bottles of beer on the wall, \n");
string txt2(" bottles of beer, take one down, pass it around, \n");
string txt3(" bottles of beer on the wall! \n");
while(i > 0)
{
cout << i << txt << i << txt2;
i = i - 1;
cout << i << txt3;
}
}