CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

// Testing repetitions with time... c3dotime.cpp

// Revised August/8/94

#include "franca.h"

void jumpjack(athlete she) // Function JumpJack

{

she.ready();
she.up();
she.ready();

}

void mainprog() // Main Program

{

athlete Kim; // declare Kim as an athlete
int howmany=1; // declare a counter
Clock timex; // create a clock
while (timex.time()<12) // while time less than 12
{
jumpjack(Kim); // jumpjack
Kim.say(howmany++); // say how many times
}
}