Switch Statement Question

Hi, I wanted to know if this was correct way to convert the following if/else statement to switch just a segment

1
2
3
4
else if ( choice == 2 || choice == 3)
{
	cout << fixed << showpoint << setprecision(4);
}


would it be the following below? Just leave the first one blank and fill in the second one?
1
2
3
4
case 2:
case 3:
cout << fixed << showpoint << setprecision(4);
break;


Thank You
The first one is not "blank" - that's the wrong way to think of it. But yes, that is indeed how you use a fall-through.
okay thanks
Topic archived. No new replies allowed.