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...

/*program to calculate hra,da in salary if salary less than
10000 then hra15%,da13% otherwise hra20%,da18%/*

Answer Posted / parmeshwar

#include<stdio.h>
#include<conio.h>
void main()
{
long int bs,da,hra;
clrscr();
printf("\n enter the basic salary of employee=");
scanf("%f",&bs);
if (bs<10000)
{
printf("\n da : %f",da=(bs*15)/100);
printf("\n hra : %f",hra=(bs*13)/100);
printf("\n net salary: %f",da+hra);
}
else
{
printf("\n da : %f",da=(bs*20)/100);
printf("\n hra : %f",hra=(bs*18)/100);
printf("\n net salary: %f",da+hra);
}
getch();
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an arrays?

1139


What does *p++ do?

1078


Explain how do you determine a file’s attributes?

1095


Explain two-dimensional array.

1135


What is #define?

1198


In C language what is a 'dangling pointer'?

1244


which is conditional construct a) if statement b) switch statement c) while/for d) goto

1268


How are 16- and 32-bit numbers stored?

1330


where are auto variables stored? What are the characteristics of an auto variable?

1109


What is the -> in c?

1069


What is the difference between fread buffer() and fwrite buffer()?

1228


What is the benefit of using an enum rather than a #define constant?

1323


Explain 'far' and 'near' pointers in c.

1190


How can you allocate arrays or structures bigger than 64K?

1202


Why do we use main function?

1238