Switch case reusability. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Switch case reusability.

I just made a simple calculator using switch case. after choosing an option it shows me output. but I want to make him ask again for an option. so what should I do ?

15th Oct 2017, 5:48 PM
varad sant
varad sant - avatar
2 Answers
+ 6
Use a loop. Keep asking until they or you want to exit.
15th Oct 2017, 7:05 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
Infinity while loop
15th Oct 2017, 7:05 PM
Ahmed Mudhafar Mohsin
Ahmed Mudhafar Mohsin - avatar