Skip to content

Instantly share code, notes, and snippets.

@asterwolf
Created September 7, 2015 04:18
Show Gist options
  • Save asterwolf/abcf6b9ab9d72f18dc84 to your computer and use it in GitHub Desktop.
Save asterwolf/abcf6b9ab9d72f18dc84 to your computer and use it in GitHub Desktop.
/*
* Tester program
* @author: Diego Diaz
* Created on: Sept 06, 2015
* Source File: bottlesOfBeer.cpp
*/
#include <iostream>
#include <sstream>
using namespace std;
int main(int arc, char* argv[]){
for(int bottles = 100; --bottles >= 0; cout << bottles << " bottles of beer on the wall." << endl) {}
}
@asterwolf
Copy link
Author

Count down from 99 bottles of beer on the wall to 0. All done with one line of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment