The program should be in C Write a program that inputs the e
The program should be in C++
Write a program that inputs the empid and monthly salary of 10 employees. The program checks annual salary of each person. If annual salary is greater than or equal to 250,000/= then it should prints empid, salary\' and a message \"Tax to be Paid\" else it prints empid, salary and a message \"No Tax\"Solution
#include<iostream.h>
#include<conio.h>
#define SIZE 10
class emp
{
float sal,basic
char name[10],emp_id[10];
public:
void getdata();
void ann_sal();
void dispdata();
};
void emp::getdata()
{
cout<<\"\ Enter employee id: \" ;
cin>>emp_id;
cout<<\" Enter employee name: \" ;
cin>>name;
cout<<\"Enter employee monthly salary in Rs: \" ;
cin>>basic;
}
void emp::ann_sal()
{
sal =12*basic ;
}
void emp::dispdata()
{
cout
<<\"\ Employee id: “<<emp_id;
<<\"\ Employee name: “<<name;
if ( sal >= 250000)
cout<<\"\ Tax To Be Paid”;
else
cout<<“\ No Tax”;
}
void main()
{
clrscr();
emp ob[SIZE];
count<<\"\ Calculation of Employee Net Salary\"
for(int i=0;i<10;i++)
{
ob[i].getdata();
ob[i].net_sal();
}
clrscr();
cout<<\"\ -----------------\"
<<\"\ Employee Detail::\"
<<\"\ -----------------\";
for( i=0;i<10;i++)
{
cout<<\"\ \ Employee:\"<<i+1
<<\"\ ----------\";
ob[i].dispdata();
}
getch();
}


