Then write an algorithm for each of these two problems in pseudocode.(25
points each)
1) Mr. Jones decided to go gambling one night. He went to a casino
and spent $5.00 admission to enter. While gambling, he doubles his money.
He leaves and then pays $5.00 for parking. He goes to another casino,
pays $5.00 admission to enter and doubles his money. After he leaves
and pays $5.00 for parking, he has no money left. How much money
did Mr. Jones have when he started?
Tips about problem # 1 :
- Mr. Jones must always have no money left at the end.
- The user should specify the number of casinos.
- The user should specify the admission fee to enter the casino.
You can assume it will be the same for every casino.
- The user should specify the parking fee. You can assume
it will be the same each time he parks.
2) Your grade in CMSC104 is based on the following:
3 Homeworks (4% each) = 12%
4 Projects (7% each) = 28%
3 Exams (20% each) = 60%
Total = 100%
If you have the following homework, project and exam grades at the end of
the semester, calculate your final grade for the course:
Homework 1 = 100/100 Project 1 = 90/100 Exam 1 = 90/100
Homework 2 = 50/100 Project 2 = 100/100 Exam 2 = 85/100
Homework 3 = 100/100 Project 3 = 95/100 Exam 3 = 80/100
Project 4 = 95/100
Tips about problem # 2 :
- You should allow the user to enter in each of
the homework, project and exam grades individually.