0
A way to input a choice
To be concise, I was wondering if it is possible to be able to make the program able to give users a choice of what they want to do or see?
6 Respostas
+ 3
Yes, if you program it that way, but it will be limited to what you program it to do or have the capability of doing etc.
+ 3
This would depend on the language, what it is you want to do, and how you wish to choose what to do. However, with most languages you will use some sort of decision tree (if, if-else, if-else if, switch, etc) with comparison statements to check against to run the code that is desired.
If you'd like help with a small example, please specify the language, what should be compared (int, char, string, etc).
+ 3
Minor example using a char.
https://code.sololearn.com/cmIY4EXb3dS6/?ref=app
0
My question more specifically is how can i get it to work?
0
How could I implement it in C++ exactly?
My apologies for not clarifying earlier.