My issue
In break and switch
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int choice;
switch(choice) {
case 1:
cout << "Option 1 selected";
break;
case 2:
cout << "Option 2 selected";
break;
case 3:
cout << "Option 3 selected";
break;
default:
cout << "Invalid choice";
}
return 0;
}
Learning course: ATT - C++
Problem Link: Identify the error in ATT - C++