include vcl include iostream void main int mas int max_element nu_el i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#include <vcl.h>
#include <iostream.h>
void main()
{
int mas[]={4, 8, 3, 2, 0 , 7, 9, 5, 5};
int i,max_element,nu_el;
int size_mas = sizeof(mas)/sizeof(mas[0]);
nu_el=mas[0];
for (i = 0; i < size_mas; i++)
{
if (mas[i]>nu_el) nu_el=i;
}
cout << "Number of the maximum element " << nu_el <<endl;
cout << "The maximum number " << mas[nu_el] ;
cin.get();
}