This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Project: Star Search | |
A particular talent competition has five judges, each of whom awards a score between | |
0 and 10 to each performer. Fractional scores, such as 8.3, are allowed. | |
A performerís final score is determined by dropping the highest and the lowest score | |
received, then averaging the three remaining scores. Write a program that calculates | |
the score of each performer and determines the winner. | |
Assume thereís only one winner! | |
Input: Read data from an input file named performers.txt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Write a program that acts as a self-checkout register at a store and lets the user buy 2 items. | |
First call the "signature" function you wrote for Program 3A. | |
The program will prompt the user and read in: | |
- the name of item 1, such as mechanical pencil. | |
- the price of item 1 and number of items 1, such as: 2 2.50 | |
- the name of item 2, such as binder | |
- the price of item 2 and the number of items 2, such as: 3 7.25 | |
Read both the price and the number in one C++ statement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Guessing Game: | |
This is a simple guessing game between a computer and a player. First, the computer prompts the player to enter his/ | |
her name then it generates a random number between 10 and 30. The player has up to five tries to guess the number. | |
After each guess, the program displays messages such as “Congratulations Susan, you’ve guessed the number in 2 | |
tries!”, or “Sorry, the random number was 8!” . Ask the player if s/he wants to play again (Y or y for yes, anything | |
else for no) “Susan, would you like to play again?”. When the current player is done, ask for another player and start | |
all over again: “Would somebody else want to play?” |