The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 364 Weeks Ago, 2 Days Ago |
| Questions Answered: | 1850 |
| Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
The keypad on your oven is used to enter the desired baking temperature and is arranged like the digits on a phone. Unfortunately, the digits 1, 4, and 7 do not work.
1 2 3 4 5 6 7 8 9 Â 0 Â
When a recipe calls for a temperature that can't be entered (due to keys not working), you want to substitute a temperature that can be entered.
Write a program that takes a desired temperature as an input from the user. The temperature must be between 0 and 999 degrees.
If the desired temperature does not contain 1, 4, or 7, then display the desired temperature. If it contains 1, 4, or 7, compute and display the next largest temperature that doesn't contain 1, 4, or 7.
For example, if the desired temperature is 450, then the program should output 500. Similarly, if the desired temperature is 375, then the program should output 380.
In your program, include and use a function named "containsDigit" declared as below. If the entered number contains a digit, the function should return true. Otherwise, the function should return false.
bool containsDigit(int number, int digit)
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I