

Link: http://codepad.org/9AH9Xsf9 raw code | output | fork ]



C++ , pasted on Jun 5:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #include <iostream> #include <string> using namespace std ; void happy (); void birthday ( int iterator [], string party ); int main ( int argc , const char * argv [] ){ happy (); return 0 ; } void happy (){ string party = "Happy Birthday!" ; int partyLength = party . length (); int iterator [ 2 ] = { partyLength , partyLength - 1 }; for ( int condition = 0 ; condition < iterator [ 0 ]; birthday ( iterator , party )){ iterator [ 0 ] -- ; } } void birthday ( int iterator [], string party ){ int position = iterator [ 1 ] - iterator [ 0 ]; cout << party . substr ( position , 1 ); }



Output: 1 Happy Birthday!