Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void Podzielna();
- void Min3();
- int main() {
- cout<<"Jesli chcesz zakonczyc program wcinij x"<<endl<<endl;
- do{
- Podzielna();
- Min3();
- } while(getchar()=='x' );
- return 0;
- }
- void Podzielna()
- {
- int a,b;
- cout<<"podaj 2 liczby: ";
- cin>>a>>b;
- if(a%b!=0)
- cout<<"Liczba "<<a<<" nie jest podzielna przez "<< b << endl<< endl;
- else
- cout<<"Liczba "<<a<<" jest podzielna przez "<< b << endl << endl;
- }
- void Min3()
- {
- int x,y,z;
- cout<<"Podaj 3 liczby: ";
- cin>>x>>y>>z;
- if(x<y)
- {
- if(x<=z)
- cout<<"Liczba "<< x <<" jest mniejsza lub rowna "<< z <<endl;
- }
- if(y<=z)
- cout<<"Liczba "<< y <<" jest mniejsza lub rowna "<< z <<endl;
- else
- cout<<"Liczba "<< z <<" jest mniejsza lub rowna "<< y <<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement