Advertisement
Guest User

Untitled

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