Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a, b,c;
- cout<<"Podaj 3 liczby" <<endl;
- cin>>a>>b>>c;
- if(a<b&&a<c)
- {
- if(b<c)
- {
- cout<<a<<" "<<b<<" "<<c;
- }
- else
- {
- cout<<a<<" "<<c<<" "<<b;
- }
- }
- else if(b<a&&b<c)
- {
- if(c<a)
- {
- cout<<b<<" "<<c<<" "<<a;
- }
- else
- {
- cout<<b<<" "<<a<<" "<<c;
- }
- }
- else
- {
- if(a<b)
- {
- cout<<c<<" "<<a<<" "<<b;
- }
- else
- {
- cout<<c<<" "<<b<<" "<<a;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement