Convert the following if/else if statement into a switch statement:
if (choice == 1)
{
cout << fixed << showpoint << setprecision(2);
}
else if ((choice == 2) || (choice == 3))
{
cout << fixed << showpoint << setprecision(4);
}
else if (choice == 4)
{
cout << fixed << showpoint << setprecision(6);
}
else
{
cout << fixed << showpoint << setprecision(8);
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.