+ 4

In calculator why while loop is used??

28th May 2018, 2:01 PM
Meet Rajpopat
Meet Rajpopat - avatar
5 Respuestas
+ 4
To keep the program running until a code to break is executed (you may want to try this on your computer)
28th May 2018, 6:57 PM
Muhammad Hasan
Muhammad Hasan - avatar
+ 2
u calculate the many values repeatly that time u don't know how many times to calculate the value so that's only using while loop u know I calculate using 5 values only using for loop but u don't know u using while loop only
29th May 2018, 6:17 PM
Pradheepviki😎😀
Pradheepviki😎😀 - avatar
+ 1
Please insert the code you are refering to.
28th May 2018, 3:48 PM
***
*** - avatar
+ 1
You can also it if u want to do calculation until a number is given as input for example: Let's say that u want can do 10 operations in the calculator and u want to do as many calculation as u want if you need to end it enter such that if a number is entered the loop which makes the condition false and ends the program . I hope it is understandable 😅😅
29th May 2018, 8:37 PM
Ganapathy Karthikeyan
+ 1
the calculator keeps on waiting for input from the user, until we turn it off (here some break condition to exit from the loop). To keep it in waiting mode, we use while loop.
6th Jun 2018, 6:54 PM
Rahul Kumar
Rahul Kumar - avatar