Can anyone here fix this?

Crescent13

Diamond Member
Jan 12, 2005
4,793
1
0
Here's an example of the output,

99 bottles of beer on the wall, 99 bottles of beer, take one down, pass it aroun
d
, 99 bottles of beer on the wall,
98 bottles of beer on the ........

the things I need fixed are highleted in bold, I want to make it so that it counts down the next number where it is highleted, and I don't want the d in around to be carried over to the next line. here is my code.



#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
string a = " bottles of beer on the wall, ";
string b = " bottles of beer,";
string c = " take one down, pass it around, ";
int x;
for (x=99; x>=0; x--) {
cout << x << a << x << b << c << x << a << endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}
 

jkoon

Member
Apr 12, 2005
158
0
0
What are you running this on (windows command prompt, linux terminal etc)?

I assume you are using more characters than the default width of the terminal/command prompt allows.