Question: Rewrite the following if-else as a switch statement . if (InternalTemp == 185) cout < < Poutry is done. < < endl; else if (InternalTemp

Rewrite the following if-else as a switch statement.

if (InternalTemp == 185)

cout << Poutry is done. << endl;

else if (InternalTemp == 170)

cout << Beef is done. << endl;

else if (InternalTemp == 177)

cout << Lamb is done. << endl;

else if (InternalTemp == 140)

cout << Beef is done. << endl;

else

cout << Meat's not done yet. << endl;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!