Calendar - #include #include #include #include int getYear has the user enter a valid year bool isLeap(int

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream.h> #include <stdlib.h> #include <ctype.h> #include <time.h> int getYear(); // has the user enter a valid year bool isLeap(int year); // check for leap years void dayName(); // prints the names for the day of the week void monthNameHeader(int year); // puts head for the month name int startDay(int year); // decides what week day Jan starts on int monthCount(int counter); // how many days are in each month void newMonth(int startDOW); // what day of the week new month starts on void printAll(int year); // puts everything together, prints to screen int year = 0; // uesr inputed year || rand gen per 0 int counter = 1; int startDOW, // day of the week Jan starts on wrap, // check for if weekday is Saturday daysInMonth; // total days in each month int weekNumber = 0; // flag for first week of the month int main() { year = getYear(); // has user enter year number printAll(year); return 0; } int getYear() //prompts the user to enter a valid year
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/01/2011 for the course EE 210 taught by Professor Irwin during the Spring '10 term at Washington State Community College.

Page1 / 5

Calendar - #include #include #include #include int getYear has the user enter a valid year bool isLeap(int

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online