include stdio include stdlib include conio void main const int 100 int

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
void main()
{
const int N=100;
int a[N],n;
do
{
printf("\nEnter n (1-%d%s",N,"): ");
scanf("%d",&n);
}
while (n<=0 || n>N);
const int k=10;
int max=-21, imax=-1;
printf("\n");
for (int i=0;i<n;i++)
{
a[i]= rand()%(k*2+1)-k;