C Program to Find Minor Students Using an Array
#include<stdio.h>
int main()
{
int a[75], i;
printf("Enter the age of 3 students: ");
for(i=0;i<3;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<3;i++)
{
if(a[i] < 18)
{
printf("\nStudent no: %d is minor with age %d", i+1, a[i]);
}
}
}
Comments
Post a Comment