a) while loopdan foydalanib, foydalanuvchi ragam kiritgancha loopni davom ettirish kodini yozing (masalan, 0 kiritilganda loop tugaydi).
int num1 = 10;
while(num1 != 0)
{
Console.WriteLine(num1);
}
b) Quyidagi kodning natijasi nima bo'ladi?
int x = 10;
while (x > 0)
{
Console. WriteLine(x);
x -= 2;
}
javob - 10,8,6,4,2
Top comments (0)