Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int N = 5;
- int main()
- {
- setlocale(LC_ALL, "Rus");
- int a[N], min;
- cout << "Введите элементы массива . Найдите минимальный элемент" << endl;
- for (int i = 0; i < N; i++)
- {
- cin >> a[i];
- }
- min = a[0];
- for (int i = 1; i < N; i++)
- {
- if (min > a[i])
- {
- min = a[i];
- }
- }
- cout << "Min: " << min << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement