Thanatos
Active Member
I'm just learning the basics of C++ and programming in general. I need a little help on a 99 bottles of beer on the wall program. Here is what i have so far:
And it isn't working! I get the prompt to come up but it displays nothing. Sorry, this is probably a really easy fix, but i don't know it. Maybe a 'for' loop?
PHP:
#include <iostream>
#include <Windows.h>
#include <stdio.h>
using namespace std;
int main()
{
int bottles = 99;
while (bottles > 1);
{
cout << bottles << " bottles of beer on the wall!" << endl;
cout << bottles << " bottles of beer!" << endl;
cout << "take one down, pass it around," << endl;
cout << endl;
bottles - 1;
Sleep (750);
system ("CLS");
}
cout << bottles << " bottle of beer on the wall!" << endl;
cout << bottles << " bottle of beer!" << endl;
cout << "take it down, pass it around," << endl;
cout << "Zero bottles of beer on the wall!" << endl;
cout << endl;
Sleep (750);
system ("CLS");
return 0;
}
And it isn't working! I get the prompt to come up but it displays nothing. Sorry, this is probably a really easy fix, but i don't know it. Maybe a 'for' loop?