#include
using namespace std;
/*
* This C++ program prints a Pi Day countdown beginning
* with Future Day (i.e. March 1st).
*
* @creator gdt
* @created 02017.03.07
* @updated 02018.03.07
*
* @csc100 Hello CSC100 students. Rewrite this program so that it uses
* a 'for' loop instead a 'do while', I'll award you one point.
* Only programs submitted on Pi Day will be accepted. The
* subject-line of your email must be formatted as follows:
* #PiDay02018 csc100 first_name last_name
*/
int main(int, char**) {
const int PI_MONTH = 3;
const int PI_DAY = 14;
int i = 1;
int j = PI_DAY - 1;
do {
cout << PI_MONTH << '/' << i << " is "
<< j << " days away from Pi Day\n";
i++ , --j;
} while (j != 1);
cout << PI_MONTH << '/' << i << " is "
<< j << " day away from Pi Day\n";
cout << PI_MONTH << '/' << PI_DAY << " is Pi Day!\n";
}
/*
*
3/1 is 13 days away from Pi Day
3/2 is 12 days away from Pi Day
3/3 is 11 days away from Pi Day
3/4 is 10 days away from Pi Day
3/5 is 9 days away from Pi Day
3/6 is 8 days away from Pi Day
3/7 is 7 days away from Pi Day
3/8 is 6 days away from Pi Day
3/9 is 5 days away from Pi Day
3/10 is 4 days away from Pi Day
3/11 is 3 days away from Pi Day
3/12 is 2 days away from Pi Day
3/13 is 1 day away from Pi Day
3/14 is Pi Day!
*
*/