#include
#include
void main()
{
int a[20],n,i;
int *ptr,*big,*low;
clrscr();
printf("Enter n value");
scanf("%d",&n);
for(i=0;i
ptr=a;
*big=0;
for(i=0;i
if(*big<*ptr)
*big=*ptr;
if(*low>*ptr)
*low=*ptr;
ptr++;
}
printf("\n elements of array :\n");
for(i=0;i
printf("\n Biggest value of array:%d",*big);
printf("\n Lowest value of an array : %d",*low);
getch();
}
No comments:
Post a Comment