Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. setlocale (LC_ALL, "");
  5. int num1, num2;
  6.  
  7. cout << "Podaj pierwszą liczbę: ";
  8. cin >> num1;
  9.  
  10. cout << "Podaj drugą liczbę : ";
  11. cin >> num2;
  12.  
  13. if (num1==2 && num2==2){
  14. cout << "Obie liczby są równe 2";
  15. }
  16.  
  17. else if (num1==2 || num2==2){
  18. cout << "Pierwsza liczba lub druga jest równa 2";
  19. }
  20.  
  21. else{
  22. cout << "Żadna liczba nie jest równa 2";
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement