Horje
while loop Code Example
while loop
h=0
m=7
while a<7:
    for m in range(7):
        h+=1
        m-=1
        print(a,b)
        if m==1 or h==1:
         break    
while loop
While(condition is true) {

// Code                                         // The block keeps executing as long as the condition is true

// Code

}
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
}
Here, statement(s) may be a single statement or a block of statements. The condition may be any expression, and true is any non zero value. 

When executing, if the boolean_expression result is true, then the actions inside the loop will be executed. This will continue as long as the expression result is true.

When the condition becomes false, program control passes to the line immediately following the loop.
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
while(condition) {
   statement(s);
}
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
}




C

Related
grepper vscodium Code Example grepper vscodium Code Example
downgrade chrome to previous stable version in linux Code Example downgrade chrome to previous stable version in linux Code Example
c absolute value of integer Code Example c absolute value of integer Code Example
linux directory commands Code Example linux directory commands Code Example
matrix multiplication in c Code Example matrix multiplication in c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10