1put everything in the case x: under {} brackets
2metti tutto quello nel case x: sotto le parentesi {}
1switch (choice)
2{
3 case 1: get_two_numbers(x, y);
4 //* vv here vv *
5 int sum = add(x, y);
6 //* ^^ here ^^ */
7 cout << x << " + " << y << " = " << sum << endl;
8 break;
9 case 2: get_two_numbers(x, y);
10 //* vv here vv */
11 int diff = subtract(x, y);
12 //* ^^ here ^^ */
13 cout << x << " - " << y << " = " << diff << endl;
14 break;
15 default:;
16}
1switch (choice)
2{
3 case 1:
4 {
5 get_two_numbers(x, y);
6 int sum = add(x, y);
7 cout << x << " + " << y << " = " << sum << endl;
8 }
9 break;
10 case 2:
11 {
12 get_two_numbers(x, y);
13 int diff = subtract(x, y);
14 cout << x << " - " << y << " = " << diff << endl;
15 }
16 break;
17 default:
18 break;
19}