JakubKaczmarek_123

zadanie 9

Nov 2nd, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int x, y;
  5. int main()
  6. {
  7. cout << "Wprowadz pierwsza liczbe: " << endl;
  8. cin >> x;
  9. cout << "Wprowadz druga liczbe: " << endl;
  10. cin >> y;
  11. if (x == 0) cout << "Nie mozna dzielic przez 0" << endl;
  12. else if (y%x == 0) cout << "Druga liczba jest podzielna przez ta pierwsza" << endl;
  13. else cout << "Druga liczba nie jest podzielna przez ta pierwsza" << endl;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment