LOGICAL OPERATOR

charos1mm

Charos1mm

Posted on January 11, 2023

LOGICAL OPERATOR

Bir yoki bir necha shartlarni solishtirish va ularni to'g'ri yoki noto'ri ekanligini aniqlash.

  • ! - YO'Q.

  • && - VA.

    • YOKI.
  • Natija har doim True yoki False.

  • True 1,False 0 qaytardi.

  • 0 dan boshqa har qanday qiymat True yani Rost deb hisoblanaldi.

#include <iostream>
using namespace std;
int main() {
  int  a = 7;
  int  b = 3 + a;
  int  c = a && b ;

  cout << c;
return 0;
  }
Enter fullscreen mode Exit fullscreen mode
#include <iostream>
using namespace std;
int main() {
  int  a =27;
  int  b = 67 + a;
  int  c = ++a < 5  --b < 3 ;

  cout << c;
return 0;
  }
Enter fullscreen mode Exit fullscreen mode

Dasrligimiz kundan kunga qiyin va qiziqarli bolib bormoqda .

@dawroun

💖 💪 🙅 🚩
charos1mm
Charos1mm

Posted on January 11, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related