Skip to content

Latest commit

 

History

History
executable file
·
34 lines (26 loc) · 779 Bytes

while-loop.md

File metadata and controls

executable file
·
34 lines (26 loc) · 779 Bytes
sort
10

पर्यन्तम् (while loop)

transliteration: Paryantam, meaning: round-loop

Vedic includes पर्यन्तम् loop to execute code repeatedly till it satisfies a specified condition. Unlike चक्रम् loop, पर्यन्तम् loop only requires condition expression.

For example, here is a for loop that वद all of the numbers ० to ९

# This will print ० to ५
मान अ = ०;
पर्यन्त( अ <= ५)
{
  वद(अ);
  अ = अ+ १;
}

Output:

०
१
२
३
४
५

you can also use विराम and अग्रिम keyword in पर्यन्तम् aslo same as चक्रम् loop