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;
- cin >> a >> b >> c;
- if(a <= b and a <= c) {
- cout << a << endl;
- if(b <= c) {
- cout << b << endl;
- cout << c << endl;
- }
- else {
- cout << c << endl;
- cout << b << endl;
- }
- }
- else if(b <= a and b <= c) {
- cout << b << endl;
- if(a <= c) {
- cout << a << endl;
- cout << c << endl;
- }
- else {
- cout << c << endl;
- cout << a << endl;
- }
- }
- else if(c <= a and c <= b) {
- cout << c << endl;
- if(a <= b) {
- cout << a << endl;
- cout << b << endl;
- }
- else {
- cout << b << endl;
- cout << a << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement