• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can anyone here fix this?

Crescent13

Diamond Member
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;
}
 
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.
 
Back
Top