0
How I can create a submenu in menu?
menu
2 Antworten
0
Your question is not really clear, but I guess you are talking about a sub case of an if statement.
You just have to add an if statement inside of another if statement.
#include <iostream>
using namespace std;
int main()
{
int firstVar = 0;
int secondVar = 0;
cin >> firstVar;
cin >> secondVar;
if (firstVar == 0) {
if (secondVar == 0) {
cout << "Both vars are 0" << endl;
}
else {
cout << "Just the first var is 0" << endl;
}
}
}
0
Tks!But I want to know how I can create a down submenu in menu.I must to do a new menu in case?If i have an option (in first case) and i want to access her to introduce another option...this is what i ask 😊