Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cmath>
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- int main()
- {
- int A, B, C, max, min;
- cout << "Vvedite 1 chislo" << endl;
- cin >> A;
- cout << "Vvedite 2 chislo" << endl;
- cin >> B;
- cout << "Vvedite 3 chislo" << endl;
- cin >> C;
- if (A > B && A > C) {
- max = A;
- }
- if (B > A && B > C) {
- max = B;
- }
- if (C > A && C > B) {
- max = C;
- }
- if (A < B && A < C) {
- min = A;
- }
- if (B < A && B < C) {
- min = B;
- }
- if (C < A && C < B) {
- min = C;
- }
- cout << "MAX = "<< max << endl;
- cout << "MIN = " << min << endl;
- return 0;
- }
- ###############################################
- #include <cmath>
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- int main()
- {
- int A, B, C, D, k;
- cout << "Vvedite 1 chislo" << endl;
- cin >> A;
- cout << "Vvedite 2 chislo" << endl;
- cin >> B;
- cout << "Vvedite 3 chislo" << endl;
- cin >> C;
- cout << "Vvedite 4 chislo" << endl;
- cin >> D;
- cout << "NACHALNAYA POSLEDOVATELNOST : " << A << " " << B << " " << C << " " << D << endl;
- if (A > B) {
- int k = A;
- A = B;
- B = k;
- }
- if (A > C) {
- int k = C;
- C = A;
- A = k;
- }
- if (A > D) {
- int k = D;
- D = A;
- A = k;
- }
- if (B > C) {
- int k = C;
- C = B;
- B = k;
- }
- if (B > D) {
- int k = D;
- D = B;
- B = k;
- }
- if (C > D) {
- int k = D;
- D = C;
- C = k;
- }
- cout << "" << endl;
- cout << "####################################" << endl;
- cout << "" << endl;
- cout << "KONECHNAYA POSLEDOVATEL'NOST' : " << A << " " << B << " " << C << " "<< D << endl;
- return 0;
- }
- ######################################
- #include <cmath>
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- int main()
- {
- int x;
- cout << "Vvedite chislo" << endl;
- cin >> x;
- if (x >= 10 && x <= 99) {
- if ((x%2)==0) {
- cout << x << " - 2-ZNACHNOE CHETNOE CHISLO" << endl;
- }
- else
- cout << x << " - 2-ZNACHNOE, NO NECHETNOE CHISLO" << endl;
- }
- else cout << "VVEDITE DRYGOE CHISLO" << endl;
- return 0;
- }
- #######################################
- #include <cmath>
- #include <iostream>
- using std::cout;
- using std::cin;
- using std::endl;
- int main()
- {
- cout << "VVEDITE 3-ZNACHNOE CHISLO = " << endl;
- int N, x1, x2, x3{};
- cin >> N;
- x3 = N % 10;
- x2 = N / 10 % 10;
- x1 = N / 100;
- int S;
- S = x1 + x2 + x3;
- if ((S % 2) == 0) {
- cout << "S = " << S << " - syymma cifr chisla CHETNAYA" << endl;
- }
- else cout << "S = " << S << " - syymma cifr chisla NECHETNAYA" << endl;
- return 0;
- }
- ##########################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement