You are to complete exercise 20, p 27.You need to type up the algorithm you would use to solve the problem presented.
Submit your algorithm as a text attachment to an email to me.
Due Date:
Thursday, October 13th, 8:00am
Fall 2011
You are to complete exercise 20, p 27.
Final grades for this class will be determined according to the following criteria:
You are to write a console application that generates a random number (from 1 - 10) for the user. Display a short menu to the user, informing them which input will generate a random number and which input will terminate the program. Your solution must include a do-while loop and a switch statement.
Read chapter 5, Control Structures II (Repetition).
I am using Bloodshed's Dev-C++ IDE to test your code. When you submit your homework and your labs from now on, you will need to send me your whole project, not just your .cpp file(s).
It is unacceptable to use "magic numbers" in your source code. When dealing with trivial programs, using a naked number doesn't look like such a big deal (the code is short and, if well commented, the intent of the programmer is clear) but it is still a very bad habit to develop. The problem is both clearer to see and greatly magnified once the size of the code in question is larger.
You are to write a program that reads in the month and year and displays for the user the number of days in that month. You must use assert to error trap the input and you must be able to determine if the year entered is a leap year.