An interactive c program to read basic salary of 15
persons. each person gets 25% of basic as HRA, 15%of basic
as conveyance allowances, 10%of basic as entertainment
allowances.The total salary is calculated by adding
basic+HRA+CA+EA.Calculate how many out of 15 get salary
above 10,000.Rs also print the salary of each employee
Answer Posted / gunda raj
void main()
{
int COUNT=0,BS,HRA,CA,EA,TOTAL[20] ;
FOR(int i=0;i<15;i++)
{
cout<<"enter basic salary";
cin>>BS;
HRA=(BS/100)*25;
CA=(BS/100)*15;
EA=(BS/100)*10;
TOTAL=BS+HRA+CA+EA;
cout<<"total salary of"<<i<< "employee is"<<TOTAL[i];
}
FOR(INT I=0;I<=14;I++)
{
if(TOTAL[I]>=10000)
COUNT++
}
COUT<<"THE NUMBER OF EMPLOYEES ABOVE 10000 ARE"<<COUNT;
}
Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
Explain #pragma statements.
Is there sort function in c?
What is the stack in c?
What is file in c preprocessor?
What's the best way of making my program efficient?
Multiply an Integer Number by 2 Without Using Multiplication Operator
What is size of union in c?
What tq means in chat?
What are high level languages like C and FORTRAN also known as?
What are different types of operators?
What is pointer to pointer in c?
What is a protocol in c?
Can you please explain the difference between exit() and _exit() function?
Explain how can you avoid including a header more than once?
What is #line?