foundationda 7 - dars

Rivojiddin - Aug 17 - - Dev Community

bu belgi chap tomoni o'ng tomondan kichikroq

<
Enter fullscreen mode Exit fullscreen mode

bu belgi chap tomoni kichikroq yoki o'ng tomonga teng

<=
Enter fullscreen mode Exit fullscreen mode

bu belgi chap tomoni o'ng tomonga teng

==
Enter fullscreen mode Exit fullscreen mode

bu belgi chap tomoni o'ng tomondan katta yoki teng

>=
Enter fullscreen mode Exit fullscreen mode

bu belgi chap tomoni o'ng tomondan kattaroq

>
Enter fullscreen mode Exit fullscreen mode

bu belgi chap tomoni va o'ng tomoni bir xil emas

!=
Enter fullscreen mode Exit fullscreen mode

operator :

!
Enter fullscreen mode Exit fullscreen mode

manosi: not

operator:

&&
Enter fullscreen mode Exit fullscreen mode

manosi: and

operator:

||
Enter fullscreen mode Exit fullscreen mode

manosi : or

bu codda ikkita son kiritiladi va ikkitasidan eng kattasini chiqarib beradi.

int main(){
    int a, b;

    cin >> a >> b;

    cout << (a >= b ? a : b);

    return 0;

}
Enter fullscreen mode Exit fullscreen mode

butun sonni oʻqiydi va keyin uning 20 dan 30 gacha boʻlgan maʼlum diapazonga toʻgʻri kelishini tekshiradi. Agar raqam diapazonda bo'lsa (u operatordan foydalanganda C++ da 1bo'ladi ) va boshqa hollarda (qaysi bo'lsa ) chop etadi . Mana kodning qisqacha taqsimoti:true<>false

int main() {
    int n;
    cin >> n;
    cout << (n >= 20 && n <= 30) << endl;
    return 0;
}
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . .
Terabox Video Player