Răspuns:
#include <iostream>
using namespace std;
int main() {
int v[100],max=0,min;
for(int i=1;i<=5;i++)
cin >> v[i];
for(int i=1;i<=5;i++) {
if(v[i]>max)
max=v[i];
}
for(int i=1;i<=5;i++) {
if(v[i]<min)
min=v[i];
}
cout << "Numarul maxim: " << max << endl;
cout << "Suma: " << max+min;
}