Question

int num; int total = 0; cout << "Enter a number from 1 to 10."; cin...

int num;

int total = 0;

cout << "Enter a number from 1 to 10.";

cin >> num;

switch (num)

{

   case 1:

   case 2:   total = 5;

   case 3:   total = 10;

   case 4:   total = total + 3;

   case 8:   total = total + 6;

   default: total = total + 4;

}

cout << total;

A.

10

B.

0

C.

23

D.

3

E.

None of these

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

E.

None of these

we could not input any value so default value will be run so output is 4 to above program

esc to close close fullscreen のsource code 5 int main() 7 int num; int total # 0; 9 cout < Enter a number from 1 to 10.\n;

Add a comment
Know the answer?
Add Answer to:
int num; int total = 0; cout << "Enter a number from 1 to 10."; cin...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT