Advenced logical operators | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Advenced logical operators

Hello. I was wondering, if there is some short syntax for logical operators like XOR or NOR. In courses on sololearn, there are usually described only AND, OR and NOT operators. I know, that I can get NOR by connecting more simple operators together (like (!a && !b)), but for operators like XNOR, when I have multiple inputs this method gets unpractical. Is there something like (a 💠 b 💠 c 💠 d) where I can replace the flowers with a single symbol to get XNOR? I want to know syntaxes for XOR NOR NAND XNOR.

24th Apr 2018, 7:34 PM
Jan Štěch
Jan Štěch - avatar
3 Answers
0
It doesn't work. The code won't compile. Did I do something wrong? https://code.sololearn.com/cuyfvxdKnmP3/?ref=app
27th Apr 2018, 5:35 AM
Jan Štěch
Jan Štěch - avatar
0
So operator overloading?
27th Apr 2018, 5:57 AM
Jan Štěch
Jan Štěch - avatar
0
Ok, thanks.
27th Apr 2018, 8:11 AM
Jan Štěch
Jan Štěch - avatar