Advertisement
MeehoweCK

Untitled

Dec 22nd, 2018
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     /* operatory logiczne:
  8.     && - AND
  9.     || - OR
  10.     */
  11.  
  12.     if(5 > 3 || 10 < 12)
  13.         cout << "Przynajmniej jeden z warunkow powyzej jest spelniony" << endl;
  14.     if(6 > 2 && 10 > 5)
  15.         cout << "Oba powyzsze warunki sa spelnione" << endl;
  16.  
  17.     int liczba = 187;
  18.  
  19.     if(liczba % 17 == 0)
  20.         cout << "Liczba " << liczba << " jest podzielna przez 17." << endl;
  21.     else
  22.         cout << "Liczba " << liczba << " nie jest podzielna przez 17." << endl;
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement