Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

List out few of the applications that make use of Multilinked Structures?

2115


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

1120


How important is structure in life?

1030


What are variables c?

1000


If fflush wont work, what can I use to flush input?

1054


What is the use of define in c?

1004


How can I avoid the abort, retry, fail messages?

1086


What is sizeof c?

1004


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1053


Who invented b language?

1341


What is the difference between new and malloc functions?

1055


What is the difference between abs() and fabs() functions?

1062


Explain the properties of union. What is the size of a union variable

1133


What is the difference between formatted&unformatted i/o functions?

1012


What are external variables in c?

1042