Please refer to this site to know what the question is about: http://www.chegg.c
ID: 3528938 • Letter: P
Question
Please refer to this site to know what the question is about: http://www.chegg.com/homework-help/questions-and-answers/use-higher-rating-given-correct-answer-suppose-keypad-commercial-convection-oven-used-ente-q3711800 This is the code that I have: #include using namespace std; int main () { int temp, first, second, third, small, large, final; char again; do { cout <<"Please enter temperature setting: "; cin >> temp; while (temp < 0 || temp > 999) { cout << "INVALID TEMPERATURE - Please enter temperature setting: "; cin >> temp; } first = temp / 100; // saves first number second = (temp - (temp/100))/10; // saves second number third = (temp - (temp/10)*10); // saves third number if (first != 1 || first != 4 || first != 7 || second != 1 || second != 4 || second != 7 || third != 1 || third != 4 || third != 7) { //compares the conditions //WHAT SHOULD BE INCLUDED HERE????? cout <<"The temperature will be set at" << temp << " "; cout <<"Do you wish to use another temperature setting? y/n?"; cin >> again; } else if (first == 1 || first == 4 || first == 7 || second == 1 || second == 4 || second == 7 || third == 1 || third == 4 || third == 7) { //how shoud while be used ??? /*small = temp -1; small--; large = temp ++;*/ } cout <<"The keypad circuitry is not working properly "; cout <<"The temperature setting of " << temp << " does not work "; cout <<"The next smallest temperature is " << small << endl; cout <<"and the nest largest temperature is " << large << " "; } while (again == 'y' || again == 'Y'); return 0; } THIS IS THE PROBLEM: WHERE IT SAYS "WHAT SHOULD BE INCLUDED HERE????", I TRIED DOING WHILE STATEMENT, BUT I DONT KNOW HOW MAKE IT WORK, I WAS THINKING THAT USING A FOR STATEMENT WOULD WORK IN HERE AS WELL, I JUST DONT KNOW WHICH ONE FITS BEST AND HOW TO MAKE THE STATEMENT ACHIEVE ITS GOAL. THE SIMPLER AND EASIER TO UNDERSTAND THE BETTER. THANKS!!!Explanation / Answer
please rate - thanks make more sense now? #include using namespace std; int goodDigits(int); int main() {int temp,large,small; char again; do { couttemp; while(temp999) {couttemp; } if(goodDigits(temp)==0) {small=temp-1; while(goodDigits(small)==0) {small--; } large=temp-1; while(goodDigits(large)==0) {large++; } coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.