asked 107k views
0 votes
If you have to make decision based on multiple choices, which of the following is best suited? marks :

2)if-else
3)if-else-if
1)if
4)all of the above

asked
User Janani
by
7.7k points

1 Answer

4 votes

Answer:

4) "all of the above" is a valid choice in this context. If a decision needs to be made based on multiple choices, you might use a combination of different control structures depending on the complexity of the decision-making process.

"if" statements are the basic building blocks for making decisions.

"if-else" statements are useful for handling two possible outcomes.

"if-else-if" statements are suitable when there are multiple mutually exclusive conditions.

So, "all of the above" could be a valid choice if you are open to using different constructs depending on the specific requirements of the decision you are making.

:D

answered
User Trzewiczek
by
7.8k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.