stars.cpp
/* This is the output of the stars.cpp program:
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
* * * * *
* * * * * *
It is a field of 50 stars like the one on the flag of the USA. */
#include <iostream>
using namespace std ;
void MakeSix()
// make a six-star row for the USA flag
{
cout << "* * * * * *" << endl;
}
void MakeFive()
// make a five-star row for the USA flag
{
cout << " * * * * *" << endl;
}
int main()
{
int sectionNum ;
for (sectionNum=1; sectionNum <= 4; sectionNum++)
{
MakeSix();
MakeFive();
}
MakeSix() ;
return 0;
}