Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include "windows.h"
- using namespace std;
- void main()
- {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- const int N = 18;
- double a[N];
- double b[N];
- double min;
- cout << "Введите элементы массива" << endl;
- for (int i = 0; i < N; i++) {
- cin >> a[i];
- if (i == 0)
- min = a[i];
- else
- if (a[i] < min)
- min = a[i];
- }
- if (min > 18.3)
- for (int i = 0; i < N; i++)
- b[i] = a[i] * 2;
- else
- for (int i = 0; i < N; i++)
- b[i] = a[i] / 2;
- for (int i = 0; i < N; i++) {
- cout << b[i] << " ";
- }
- cout << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement