Need a program for c ++ confused

using namespace std; const int Nmax = 100; int main() { double A[Nmax]; int n; double max; int i_max; int i; cout << "Input size "; cin >> n; cout << "Input elements "; for(i = 0; i < n; i++) cin >> A[i]; max = A[0]; i_max = 0; for(i = 1; i < n; i++) if (A[i] < max) { max = A[i]; i_max = i; } cout << "A[" << i_max << "] = " << max; getch(); return 0; } 
  • one
    Well, what's the problem (except for the complete lack of formatting)? You have already found a minimum (although you called it a maximum), so you’ll be guided a bit in the question ... - Harry
  • I need to insert an array there and fold it and that the sorting works - Daniel Koleshchuk

0