Lesson 8 of 23
while, do-while
9 min 25 XP
എത്ര തവണ loop ചെയ്യണമെന്ന് അറിയില്ലെങ്കിൽ while ഉപയോഗിക്കൂ. n % 10 അവസാന അക്കം, n / 10 അത് നീക്കുന്നു. ഈ രണ്ട് tricks reverse, palindrome-number, Armstrong-number ചോദ്യങ്ങൾ പരിഹരിക്കുന്നു.
Example: edit me and press Run
Output Loading C (first time takes a few seconds)
Press Run to see the result here.Condition ഒരിക്കലും false ആയില്ലെങ്കിൽ loop എന്നെന്നേക്കും പ്രവർത്തിക്കും. ഇവിടെ കുറച്ച് സെക്കൻഡുകൾക്ക് ശേഷം അത് സ്വയം നിർത്തപ്പെടും.