C Program to Read Salaries of 200 Employees and Read Salary

Write a C program to read salaries of 200 employees and count the number of employees getting a salary between 5000 - 10000. C Program to Read Salaries of 200 Employees and Read Salary.

Write a C program to read salaries of 200 employees and count the number of employees getting a salary between 5000 - 10000.

C Program to Read Salaries of 200 Employees and Read Salary.

Source Code,
include <stdio.h>
#include <conio.h>
void main()
{
 int sal[200],i,count=0;
 clrscr();
 for(i=0;i<200;i++)
 {
  printf("Enter the salary:");
  scanf("%d",&sal[i]);
 }
 for(i=0;i<200;i++)
 {
  if(sal[i]>=5000 && sal[i]<=10000)
   count=count+1;
 }
 printf("No of employees getting salary between 5000-10000=%d",count);
        getch();
}

You May Also Like...

Subscribe Us