- 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;
}
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;
}