while loop
While(condition is true) {
// Code // The block keeps executing as long as the condition is true
// Code
}
while loop
While(condition is true) {
// Code // The block keeps executing as long as the condition is true
// Code
}
while loop
#input # output
a=6 quantity of commodity=
b=int(input("quantity of commodity=")) sampoo
i=1 sampoo
while i <= b : sampoo
if i>a: sampoo
print("hello") sampoo
break sampoo
print('sampoo') hello (it is printed when a<=7)
i+=1 thank you for coming
print("thank you for coming")
While Loop
A while loop statement in Java programming language repeatedly executes a target statement as long as a given condition is true.
Syntax :
while(Boolean_expression) {
// Statements
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us