- Joined
- Jan 15, 2011
- Messages
- 4
- Reaction score
- 0
i was doing the classical 'bottle of beer' code for c++ and it worked out pretty well except for the fact that when i ran the code, a few lines from the beginning of the song aren't shown if i uses newline characters. Here is the code:
PHP:
#include <iostream>
using namespace std;
int main()
{
int bb = 100;
while (bb > 0 )
{
cout << bb << " bottles of beer on the wall, " << bb << " bottles of beer." << endl;
bb--;
cout << "Take one down and pass it around, " << bb << " bottles of beer on the wall\n";
}
}