Read chapter 10, Applications of Arrays (Searching and Sorting) and the vector Type.Due Date
Monday, December 12th, 6:00pm
Fall 2011
Read chapter 10, Applications of Arrays (Searching and Sorting) and the vector Type.
Read chapter 9, Arrays and Strings.
Read chapter 9, Arrays and Strings, pages 496-502.
Read chapter 8, User-Defined Simple Data Types, Namespaces, and the string Type.
Read chapter 7, User-Defined Functions II.
You are to complete exercise 2, p 340, writing a program which contains a user-defined function, isVowel. This is its header:
Read chapter 6, User-Defined Functions I.
You are to write a program that calculates a random number from 1 to 10. Ask the user to guess the number. If the user guesses correctly, display a congratulatory message. If the user displays an incorrect answer, give the user two more tries. If after three attempts the user still has not guessed the number, display a message to that effect and terminate the program.
If you would like to write an enhanced version of the second homework assignment, you can read in a char (instead of an int) and you can switch on the character entered. If you apply the tolower() function to that input character, you can make your program transparently deal with case sensitivity:
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).
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.
Read chapter 4, Control Structures I (Selection).