Please send questions to
st10@humboldt.edu .
// Contract: main: void -> int
//
// Purpose: Print the message "I LIKE SPAM! to the screen
// ten times.
//
// Examples: not really applicable --- you'll see "I LIKE SPAM!"
// printed to the screen, well, 10 times;
//
// by: Sharon Tuttle
// last modified: 11-02-05
#include <iostream>
using namespace std;
int main()
{
// WHERE DO YOU START?
int counter = 0; // very traditional, because of arrays
// (a topic coming up!)
// HOW LONG DO YOU GO?
while (counter < 10) // if start at 0 --- go while counter
{ // is LESS THAN ending limit
cout << "I LIKE SPAM!" << endl; // do the loop action
counter = counter + 1; // go to NEXT counter value
}
return EXIT_SUCCESS;
}