Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main () {
- int n, a;
- cin >> n;
- if (a > 0) {
- cout << "Greater\n"
- }
- if (n % 10 == 0) {
- if (a >= 0)
- cout << "Yes";
- else
- cout << "No";
- }
- else
- cout << "No";
- if ((n % 10 == 0) && (a > 0)) // and
- cout << "Yes";
- else
- cout << "No";
- if (!((n % 10 == 0) || (a > 0))) // or
- cout << "Yes";
- else
- cout << "No";
- if (n % 10 != 0) {
- cout << "Yes";
- }
- // 0 0 0 1
- // 0 1 0 1
- // 1 0 0 1
- // 1 1 1 0
- // not (a and b) == not a or not b
- // or ||
- // xor ^
- // A B (A or B) (A ^ B)
- // 0 0 0 0
- // 0 1 1 1
- // 1 0 1 1
- // 1 1 1 0
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment