14.Loops (Advanced)
asilbek ibragimov
Posted on October 14, 2024
14. Loops (Advanced)
a) break va continue operatorlari qanday ishlatiladi? Misol keltiring.
b) Quyidagi kod qanday ishlaydi?
for (int i = 0; i < 5; i++)
{
if (i == 3)
{
continue;
Console.WriteLine(i);
}
}
Javoblari:
a) break toxtatadi;
continue davom etadi;
b) for sikli i ni 0 dan 4 gacha (5 gacha emas)
oshiradi.if (i == 3) sharti tekshiriladi.
Agar i 3 ga teng bo‘lsa, continue operatori
ishga tushadi, va bu holatda Console.WriteLine(i);
💖 💪 🙅 🚩
asilbek ibragimov
Posted on October 14, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
githubcopilot AI Innovations at Microsoft Ignite 2024 What You Need to Know (Part 2)
November 29, 2024