15 lines
444 B
C++
15 lines
444 B
C++
/* A list of the logical operators in C++ */
|
|
#include <iostream>
|
|
|
|
int main()
|
|
{
|
|
using namespace std;
|
|
|
|
cout << "The && operator means AND . ie if ( (x == 5) && (y == 5) )\n\n";
|
|
cout << "The || operator means OR . ie if ( (x == 5) || (y == 5) )\n\n";
|
|
cout << "The ! operator mean NOT equal to. ie if ( var1 != 420)\n\n";
|
|
|
|
// Appendix C has order of operations or relational precedence on conditional statements
|
|
|
|
return 0;
|
|
} |