#include <stdio.h>
#include <conio.h>
int main()
{
int n, i, min;
printf ("\nEnter Total Numbers Of Numbers In The Array: ");
scanf ("%d",&n);
int array[n];
for(i=0; i<n; i++)
{
printf ("\nEnter %d Number: ",i+1);
scanf ("%d",&array[i]);
}
min = array[0];
for(i=0; i<n; i++)
{
if(array[i] < min)
min = array[i];
}
printf("\nThe Smallest Number in the array is %d \n",min);
}
#include <conio.h>
int main()
{
int n, i, min;
printf ("\nEnter Total Numbers Of Numbers In The Array: ");
scanf ("%d",&n);
int array[n];
for(i=0; i<n; i++)
{
printf ("\nEnter %d Number: ",i+1);
scanf ("%d",&array[i]);
}
min = array[0];
for(i=0; i<n; i++)
{
if(array[i] < min)
min = array[i];
}
printf("\nThe Smallest Number in the array is %d \n",min);
}
No comments:
Post a Comment