In the while statement, after while () inside the braket, the condition is given according to which the looping is to be done. If that condition is satisfied then the block of statements written after the while statement is executed. After that the while condition is checked again. If still that condition is fulfilled then the block of statements is executed again. This process continues as long as the condition of the while statement is satisfied.
Braket is used to write the block of statements of the loop. This braket should be used mainly when we have to use more than one statement inside the loop, but with caution if we are also using one statement inside the loop then also {} braces should be used.
while Statement
while (condition)
{
block of instructions
}
while рд╕्рдЯेрдЯрдоेрди्рдЯ рдоें while рдХे рдмाрдж () braket рдХे рдЕрди्рджрд░ рд╡рд╣ рд╢рд░्рдд рджी рдЬाрддी рд╣ै, рдЬिрд╕рдХे рдЕрдиुрд╕ाрд░ рд▓ूрдкिंрдЧ рдХी рдЬाрдиी рд╣ै। рдпрджि рд╡рд╣ рд╢рд░्рдд рдкूрд░ी рд╣ोрддी рд╣ै рддो while рд╕्рдЯेрдЯрдоेрди्рдЯ рдХे рдмाрдж рд▓िрдЦा рдЧрдпा block of statements execute рд╣ोрддा рд╣ै। рдЙрд╕рдХे рдмाрдж рдкुрдиः while рдХी рд╢рд░्рдд рдХो рдЬाँрдЪा рдЬाрддा рд╣ै। рдпрджि рдЕрдм рднी рд╡рд╣ рд╢рд░्рдд рдкूрд░्рдг рд╣ोрддी рд╣ै рддो block of statements рдкुрди execute рд╣ोрддा рд╣ै। рдпрд╣ рдк्рд░рдХ्рд░िрдпा рдЬрдм рддрдХ рдЪрд▓рддी рд░рд╣рддी рд╣ै рдЬрдм рддрдХ while рд╕्рдЯेрдЯрдоेрди्рдЯ рдХी рд╢рд░्рдд рдкूрд░्рдг рд╣ोрддी рд░рд╣рддी рд╣ै। рд▓ूрдк рдХे block of statements рдХो рд▓िрдЦрдиे рдХे рд▓िрдП braket рдХा рдк्рд░рдпोрдЧ рдХिрдпा рдЬाрддा рд╣ै। рдпрд╣ braket рдоुрдЦ्рдпрдд рддрднी рдк्рд░рдпोрдЧ рдХिрдП рдЬाрдиे рдЪाрд╣िрдП рдЬрдм рд╣рдоें рд▓ूрдк рдХे рдЕрди्рджрд░ рдПрдХ рд╕े рдЬ्рдпाрджा рд╕्рдЯेрдЯрдоेрди्рдЯ рдк्рд░рдпोрдЧ рдХрд░рдиे рд╣ों, рдкрд░рди्рддु рд╕ाрд╡рдзाрдиी рд╡рд╢ рдпрджि рд╣рдо рд▓ूрдк рдХे рдЕрди्рджрд░ рдПрдХ рд╕्рдЯेрдЯрдоेрди्рдЯ рдХा рднी рдк्рд░рдпोрдЧ рдХрд░ рд░рд╣े рд╣ैं рддो рднी {} braces рдХा рдк्рд░рдпोрдЧ рдХрд░рдиा рдЪाрд╣िрдП।
Read More:
while рд╕्рдЯेрдЯрдоेрди्рдЯ
while рд╕्рдЯेрдЯрдоेрди्рдЯ рдХा рд╕ूрдд्рд░-
while (condition)
{
block of instructions
}

