Thursday, November 29, 2012

Example Code:

void prepareForLauren ();
int main()

{

        // call function
        
        int time = 200;
        while (!isLaurenHere(time)) // (condition (argument))
        {
                
                prepareForLauren();
                time--;
        
        }

}

        bool isLaurenHere (int time) //definition, return boolean = true or false
{
        if (time == 0)
        return true;

        else
                return false;

}

void prepareForLauren () //void = return nothing
{

        cout << "Hey prepare for Lauren!" <<endl;
}

1 comment:

  1. Hmmm, I am very curious as to what this could be! How could I test it out?

    ReplyDelete