#include<stdio.h>#include<conio.h>
void main()
{
int age[40],i,count=0;
clrscr();
printf("\n Input age of 40 students:-");
for(i=0;i<40;i++)
scanf("%d",&age[i]);
for(i=0;i<40;i++)
{
if(age[i]>15&&age[i]<22)
count++;
}
printf("There are %d students whose age is in between 15 and 22 years",count);
getch();
}
No comments:
Post a Comment