We provide Engineering,HSEB notes, tutorials which can be helpful for students during college life.
Tuesday, April 7, 2015
49. Write a program which read salary of 25 employee and count the number of employees who are getting salary in between 30,000 to 40,000 [2070 Set C]
#include<stdio.h>
#inc1ude<conio.h>
void main()
{
int i, n, count = 3;
Long int salary[25];
clrscr();
printf(“\n Input salary of 25 persons:- ");
for(i=0;i<25;i++)
scanf("%ld", &salary[i]);
for(i=0;i<25;i++)
{
if(Salary[i]>30000 && salary[i]<40000)
count++;
}
printf("There are %d persons whose salary is in between 30000 and 40000",count);
getch();
}
Subscribe to:
Post Comments (Atom)
Put count=0
ReplyDeleteput count =0;
ReplyDelete