#include<stdio.h>
#include<conio.h>
int main()
{
int i,h,l,n,a[100];
int *ptr;
printf("\nEnter the max limit:");
scanf("%d",&n);
ptr=a;
for(i=0;i {
printf("\nEnter the element:");
scanf("%d",(ptr+i));
}
ptr=a;
for(i=0;i<n;i++)
{
if(h<*(ptr+i))
h=*(ptr+i);
if(l>*(ptr+i))
l=*(ptr+i);
}
printf("\nThe lowest number in the list is %d", l);
printf("\nThe highest number in the list is %d", h);
getche();
return 0;
}
#include<conio.h>
int main()
{
int i,h,l,n,a[100];
int *ptr;
printf("\nEnter the max limit:");
scanf("%d",&n);
ptr=a;
for(i=0;i
printf("\nEnter the element:");
scanf("%d",(ptr+i));
}
ptr=a;
for(i=0;i
if(h<*(ptr+i))
h=*(ptr+i);
if(l>*(ptr+i))
l=*(ptr+i);
}
printf("\nThe lowest number in the list is %d", l);
printf("\nThe highest number in the list is %d", h);
getche();
return 0;
}
0 comments:
Post a Comment