[ create a new paste ] login | about

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

C++, pasted on Jun 5:
#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!


Create a new paste based on this one


Comments: