Advertisement
Guest User

lab1.2 andr

a guest
Dec 5th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1.  
  2. #include <cmath>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     cout.setf(ios::boolalpha);
  9.     //int t = 10;
  10.     int  k,t;
  11.     bool a, r, c;
  12.     bool b = 1;
  13.  
  14.     cout << "Vvedite A (1 or 0): ";
  15.     cin >> a;
  16.     cout << "Vvedite B (1 or 0): ";
  17.     cin >> b;
  18.     cout << "Vvedite c (1 or 0): ";
  19.     cin >> c;
  20.     cout << "Vvedite k (int): ";
  21.     cin >> k;
  22.     cout << "Vvedite t (int): ";
  23.     cin >> t;
  24.  
  25.     r = ((a == 1) && (b == 1) && (c == 1) || ( k == t) );
  26.     cout << "r= " << r << endl;
  27.  
  28.     system("pause");
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement