Home‎ > ‎CIS22ATTh‎ > ‎cis-22a-tth-schedule‎ > ‎

assignment9

Assignment 9
Due Thursday, October 27 at 3:20pm

Assignment 9.1: Days in a Month (10 pts)
  • Develop a program that first asks the user to enter a month (1 for January, 2 for February, and so on) and then prints the number of days in the month followed by the word "days". For February, print the phrase "28 or 29 days".
  • The name of the source code file for this program must be monthdays.cpp and all your code must be in this file.
  • Submit to Catalyst when finished.

    Be careful of the spelling, including capitalization, as you will lose points for a misspelled name.

  • Your program must operate like this, such that the same sequence of inputs produces the same output:

I will print the number of days in a month.
Enter the month (1-12): 9
30 days

Alternately:

I will print the number of days in a month.
Enter the month (1-12): 2
28 or 29 days


Alternately:

I will print the number of days in a month.
Enter the month: 1
31 days

Hint: Thirty days hath September
Comments