Lab 1 for C++ module
These challenges are the ones from Chapter 2 (plus 1 from Chapter 3) of our Python book. Only this time, they need to be done using C++.
Go ahead and create them as console apps. Once you have completed them all, upload your repository to your online account, then submit a pull request to the CLASS repository, not mine.
If you do not know how to get to the class repository, or how to submit a pull request, ASK SOMEONE.
The program solutions should be named this way:
where the # is the challenge number. Of course, if you want points taken off, feel free to use any old name. I love wasting time trying to figure out 32 different ways of naming programs... ;)
-
Write a program that allows a user to enter his or her two favorite foods. The program should then print out the name of a new food by joining the original food names together.
-
Write a Tipper program where the user enters a restaurant bill total. The program should then display two amounts: a 15 percent tip and a 20 percent tip.
-
Write a Car Salesman program where the user enters the base price of a car. The program should add on a bunch of extra fees such as tax, license, dealer prep, and destination charge. Make tax and license a percent of the base price. The other fees should be set values. Display the actual price of the car once all the extras are applied.
-
Write a program that simulates a fortune cookie. The program should display one of five unique fortunes, at random, each time it’s run.