Logical operators – mantiq operatorlari

Assalomu aleykum! Bugungi mavzuyimiz mantiq operatorlari haqida bo’ladi. C++ dasturlash tilida mantiq operatorlari belgilar orqali ifodalanadi. Bir necha shartlarni bog’lash uchun ham maxsus belgilar mavjud.
&& – va
|| – yoki
! – yo’q ya’n bund…


This content originally appeared on DEV Community and was authored by Munisa Kuranbekova

Assalomu aleykum! Bugungi mavzuyimiz mantiq operatorlari haqida bo'ladi. C++ dasturlash tilida mantiq operatorlari belgilar orqali ifodalanadi. Bir necha shartlarni bog'lash uchun ham maxsus belgilar mavjud.
&& - va
|| - yoki
! - yo'q ya'n bunday emas yoki to'g'ri kelmaydi.

&&(and) - shu operator ishlatilganda quyidagi shartlar asosida to'g'ri yoki notog'ri javobini qaytaradi.
True && True => True
True && False => False
False && True => False
False && False => False

Agar biror kim tushunmagan bo'lsa True - to'g'ri va False - xato degan ma'noni anglatadi.

Keyingi operatorimiz ||(or) yoki operatori.
True || True => True
True || False => True
False || True => True
False || False => False

ko'rib turganingizdek or operatorini ishlatayotganda shartimiz to'g'ri bo'lishi uchun 2 ta shartdan bittasi to'g'ri bo'lishi kifoya.
! - ushbu operatorga keladigan bo'lsak , bu operator tog'ri bo'lsa notog'ri yoki noto'g'ri bo'lsa to'g'ri deb qaytaradi.
True! => False
False! => True


This content originally appeared on DEV Community and was authored by Munisa Kuranbekova


Print Share Comment Cite Upload Translate Updates
APA

Munisa Kuranbekova | Sciencx (2024-11-02T05:57:15+00:00) Logical operators – mantiq operatorlari. Retrieved from https://www.scien.cx/2024/11/02/logical-operators-mantiq-operatorlari/

MLA
" » Logical operators – mantiq operatorlari." Munisa Kuranbekova | Sciencx - Saturday November 2, 2024, https://www.scien.cx/2024/11/02/logical-operators-mantiq-operatorlari/
HARVARD
Munisa Kuranbekova | Sciencx Saturday November 2, 2024 » Logical operators – mantiq operatorlari., viewed ,<https://www.scien.cx/2024/11/02/logical-operators-mantiq-operatorlari/>
VANCOUVER
Munisa Kuranbekova | Sciencx - » Logical operators – mantiq operatorlari. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/11/02/logical-operators-mantiq-operatorlari/
CHICAGO
" » Logical operators – mantiq operatorlari." Munisa Kuranbekova | Sciencx - Accessed . https://www.scien.cx/2024/11/02/logical-operators-mantiq-operatorlari/
IEEE
" » Logical operators – mantiq operatorlari." Munisa Kuranbekova | Sciencx [Online]. Available: https://www.scien.cx/2024/11/02/logical-operators-mantiq-operatorlari/. [Accessed: ]
rf:citation
» Logical operators – mantiq operatorlari | Munisa Kuranbekova | Sciencx | https://www.scien.cx/2024/11/02/logical-operators-mantiq-operatorlari/ |

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.