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