Reletional operators - bu taqqoslash operatorlari.
Ushbu operatorga kiradigan belgilar:
> -> katta;
< -> kichik;
== -> teng;
>= -> katta yoki teng;
<= -> kichik yoki teng;
!= -> teng emas;
Kod yozishda ular juda ham muhim.
Ularni ishlatish
int a, b;
a = 10;
b = 15;
cout << (a < b ? "to'g'ri" : "noto'g'ri") << endl;
Bu holatda to'g'ri degan yozuv chiqishi kerak;
Logical operators - bu mantig' operatorlari.
Ushbu operatorga kiradigan belgilar:
! -> NOT - yo'q;
&& -> AND - va;
|| -> OR - yoki;
Ularni ishlatish
true&&true -> true - to'gri.
true&&false -> false;
false&&false -> false;
true||true -> true;
true||false -> true; Sababi yoki ni ishlatayotganda 1ta si tog'ri bo'lsa kod to'g'ri bo'ladi.
false||false -> false;
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (0)