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 hisoblana…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Charos1mm

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;
  }
#include <iostream>
using namespace std;
int main() {
  int  a =27;
  int  b = 67 + a;
  int  c = ++a < 5  --b < 3 ;

  cout << c;
return 0;
  }

Dasrligimiz kundan kunga qiyin va qiziqarli bolib bormoqda .

@dawroun


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Charos1mm


Print Share Comment Cite Upload Translate Updates
APA

Charos1mm | Sciencx (2023-01-11T14:28:14+00:00) LOGICAL OPERATOR. Retrieved from https://www.scien.cx/2023/01/11/logical-operator/

MLA
" » LOGICAL OPERATOR." Charos1mm | Sciencx - Wednesday January 11, 2023, https://www.scien.cx/2023/01/11/logical-operator/
HARVARD
Charos1mm | Sciencx Wednesday January 11, 2023 » LOGICAL OPERATOR., viewed ,<https://www.scien.cx/2023/01/11/logical-operator/>
VANCOUVER
Charos1mm | Sciencx - » LOGICAL OPERATOR. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/01/11/logical-operator/
CHICAGO
" » LOGICAL OPERATOR." Charos1mm | Sciencx - Accessed . https://www.scien.cx/2023/01/11/logical-operator/
IEEE
" » LOGICAL OPERATOR." Charos1mm | Sciencx [Online]. Available: https://www.scien.cx/2023/01/11/logical-operator/. [Accessed: ]
rf:citation
» LOGICAL OPERATOR | Charos1mm | Sciencx | https://www.scien.cx/2023/01/11/logical-operator/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.