Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x,y;
- cout << "Podaj pierwsza liczbe: " ;
- cin >> x;
- cout << "Podaj druga liczbe: " ;
- cin >> y;
- if ( x == 0 )
- {
- cout << "Nie mozna dzielic przez 0!" << endl;
- }
- else if ( y % x == 0)
- {
- cout << "Liczba druga liczba jest podzielna przez pierwsza." << endl;
- }
- else
- {
- cout << "Druga liczba nie jest podzielna przez pierwsza liczbe." << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement