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