DEV Community

Xojimurodov
Xojimurodov

Posted on

Operators(if, else if, ternery operator, swtich)

1) Kode ni qanday ishlashi:
Kod:
int x = 10;
if(x < 5) //x ni yani 10 < 5 dan ichidagi shartni bajaradi
{
Console.WriteLine("Less than 5");
}
else if(x == 10) //x yani 10 == 10 bo'lganligi uchun Console ga ichidagi shart chiqadi.
{
Console.WriteLine("Equal to 10");
}
else
{
Console.WriteLine("Great than 5");
}

2) Oddiy qiymat turlari: int, double, bool, char, byte, va hokazo.

3) Javob - Wednesday

Top comments (0)