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
Write a program to generate the Fibinocci Series
What is the difference between break and continue?
What are the functions to open and close file in c language?
what do you mean by enumeration constant?
What is "Hungarian Notation"?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What does typedef struct mean?
How many types of operator or there in c?
Can we assign string to char pointer?
Explain the advantages and disadvantages of macros.
Here is a good puzzle: how do you write a program which produces its own source code as output?
What are the two types of functions in c?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
How can you return multiple values from a function?