Question: Project 8: Broken Keypad, Again. Re-do project 11 from Chapter 3 except write a function namegd containsDigit that determines if a number contains a particular

Project 8: Broken Keypad, Again. Re-do project 11 from Chapter 3 except write a function namegd containsDigit that determines if a number contains a particular digit. The header should look like: bool containsDigit(int number, int digit) If number contains digit, then the function should return true. Otherwise, the function should return false. Your program should use this function to find the dosest numbers that can be entered on the keypad For your convenience, the instructions from Chapter 3 Project 18 are repeated below: The keypad on your oven is used to enter the desired baking temperature and is arranged like the digits on a phone 123 456 789 Unfortunately the circuitry is damaged and the digits in the leftmost column no longer function. In other words, the digits 1,4 and 7 do not work. If a recipe calls for a temperature that can't be entered then you ould e to su st ute a temperatura cn be entered write a mo an inputs desired temperature. The temperature must be between 0 and 999 degrees. If the desired temperature does not contain 1, 4, or 7, then output the desired temperature. Otherwise, compute the next largest and the next smallest temperature that does not contain 1, 4, or 7 and output both For example, if the desired temperature is 450, then the erogram should outrout 399 and 500. Similarly, if the desired temperature is 375, then the program should outout 380 and 369
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
