#include<stdio.h>
#include<conio.h>
int main()
{
int n,*a,i,min;
printf("Enter the limit: ");
scanf("%d",&n);
a=(int*)malloc(n*sizeof(int));
for(i=0;i<n;i++)
{
printf("Enter the element %d:",(i+1));
scanf("%d",&a[i]);
}
min=a[0];
for(i=0;i<n;i++)
{
if(a[i]<min)
min=a[i];
}
printf("\nThe minimum number in the array %d\n",min);
getch();
return 0;
}
#include<conio.h>
int main()
{
int n,*a,i,min;
printf("Enter the limit: ");
scanf("%d",&n);
a=(int*)malloc(n*sizeof(int));
for(i=0;i<n;i++)
{
printf("Enter the element %d:",(i+1));
scanf("%d",&a[i]);
}
min=a[0];
for(i=0;i<n;i++)
{
if(a[i]<min)
min=a[i];
}
printf("\nThe minimum number in the array %d\n",min);
getch();
return 0;
}
No comments:
Post a Comment
Convey your thoughts to authors.