Guest User

Untitled

a guest
Oct 16th, 2015
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main () {
  6.     int n, a;
  7.     cin >> n;
  8.     if (a > 0) {
  9.         cout << "Greater\n"
  10.     }
  11.  
  12.     if (n % 10 == 0) {
  13.         if (a >= 0)
  14.             cout << "Yes";
  15.         else
  16.             cout << "No";
  17.     }
  18.     else
  19.         cout << "No";
  20.  
  21.     if ((n % 10 == 0) && (a > 0)) // and
  22.         cout << "Yes";
  23.     else
  24.         cout << "No";
  25.  
  26.     if (!((n % 10 == 0) || (a > 0))) // or
  27.         cout << "Yes";
  28.     else
  29.         cout << "No";
  30.  
  31.     if (n % 10 != 0) {
  32.         cout << "Yes";
  33.     }
  34.     // 0 0 0 1
  35.     // 0 1 0 1
  36.     // 1 0 0 1
  37.     // 1 1 1 0
  38.     // not (a and b) == not a or not b
  39.     // or ||
  40.     // xor ^
  41.     // A B (A or B) (A ^ B)
  42.     // 0 0 0        0
  43.     // 0 1 1        1
  44.     // 1 0 1        1
  45.     // 1 1 1        0
  46.     return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment