int main()
{
int posts= 999;
while ( posts > 0 )
{
cout << posts << " post(s) of nef on the wall," << endl;
cout << posts << " post(s) of nef." << endl;
cout << "Take one down, pass it around," << endl;
cout << --posts << " post(s) of nef on the wall." << endl;
}
return 0;
}
Try in C++
{
int posts= 999;
while ( posts > 0 )
{
cout << posts << " post(s) of nef on the wall," << endl;
cout << posts << " post(s) of nef." << endl;
cout << "Take one down, pass it around," << endl;
cout << --posts << " post(s) of nef on the wall." << endl;
}
return 0;
}
Try in C++
