Business

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();
}

Show More

J. Satya

Started blogging in 2010 but working professionally from 2012. Apart from that working as a Digital Marketer, SEO & Conversion Specialist. Helping individuals as well as business to grow.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close
Close