Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // lb1.3.8.cpp: определяет точку входа для консольного приложения.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- double x1, x2, x3, x4, tmp;
- cout << "x1 x2 x3 x4:" << endl;
- cin >> x1 >> x2 >> x3 >> x4;
- if (x4 > x3) {
- tmp = x3;
- x3 = x4;
- x4 = tmp;
- }
- if (x3 > x2) {
- tmp = x3;
- x3 = x2;
- x2 = tmp;
- if (x4 > x3) {
- tmp = x3;
- x3 = x4;
- x4 = tmp;
- }
- }
- if (x1 > x2) {
- tmp = x1;
- x1 = x2;
- x2 = tmp;
- }
- cout << x1 << " < " << x2 << " > " << x3 << " > " << x4 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement