6.Loops
asilbek ibragimov
Posted on October 11, 2024
6.Loops(for, while, do while)
a) for loopning sintaksisisi qanday? Misol keltiring.
b) while loop va do while loop o'rtasidagi farq nima?
c) Quyidagi kodning natijasini ayting:
int i = 0;
while(i < 5)
{
Console.WriteLine(i);
I++;
}
Test Javoblari:
a) for(int variable = qiymat, variable = son; increment or
decrement;)
{
Sharti;
}
b) while loop - bu takrorlanuvchi blokni bajarish uchun
ishlatiladigan sikl operatori.
C# dasturlash tilida do while sikli (do-while loop) ma'lum
bir kodni kamida bir marta bajarishni ta'minlaydi va undan
keyin shart tekshiriladi.
c)code xato bo'lgan chunki kotta I yozilgan.
💖 💪 🙅 🚩
asilbek ibragimov
Posted on October 11, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.