99 bottles of beer: Difference between revisions
Content added Content deleted
(→{{header|Python}}: Shorter) |
(→{{header|C++}}: fixed example) |
||
Line 50: | Line 50: | ||
=={{header|C++}}== |
=={{header|C++}}== |
||
<c>#include< |
<c>#include<iostream> |
||
#include <ostream> |
|||
using namespace std; |
using namespace std; |
||
int main(int argc, char* argv[]){ |
int main(int argc, char* argv[]){ |
||
for(int x = 99;x>=1; --x){ |
for(int x = 99;x>=1; --x){ |
||
cout<<x<<"bottles of beer on the wall\n"<<x<<"bottles of beer\n"; |
cout<<x<<" bottles of beer on the wall\n"<<x<<" bottles of beer\n"; |
||
cout<<"Take one down, pass it around\n"<<x-1<<"bottles of beer on the wall\n\n"; |
cout<<"Take one down, pass it around\n"<<x-1<<" bottles of beer on the wall\n\n"; |
||
} |
} |
||
}</c> |
}</c> |