#include "stdafx.h"
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
srand(time(0));
int n;
cout << "N = ";
cin >> n;
double A[100];
for (int i = 0; i < n; i++)
cin >> A[i];
}
cout << A[i] << ' ';
cout << endl;
double max = -999;
if (max <= A[i])
max = A[i];
cout << max << endl;
system("pause");
return 0;
#include "stdafx.h"
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
srand(time(0));
int n;
cout << "N = ";
cin >> n;
double A[100];
for (int i = 0; i < n; i++)
{
cin >> A[i];
}
for (int i = 0; i < n; i++)
{
cout << A[i] << ' ';
}
cout << endl;
double max = -999;
for (int i = 0; i < n; i++)
{
if (max <= A[i])
max = A[i];
}
cout << max << endl;
system("pause");
return 0;
}