/*program to calculate hra,da in salary if salary less than
10000 then hra15%,da13% otherwise hra20%,da18%/*
Answer Posted / swapnil
#include<stdio.h>
#include<conio.h>
void main()
{
float 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 ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is a const pointer?
Is it fine to write void main () or main () in c?
How can I find the modification date and time of a file?
How many levels of indirection in pointers can you have in a single declaration?
write a c program in such a way that if we enter the today date the output should be next day's date.
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
How do you sort filenames in a directory?
How do c compilers work?
What is the hardest programming language?
What is a sequential access file?
Why is c used in embedded systems?
How do I get an accurate error status return from system on ms-dos?
How can I ensure that integer arithmetic doesnt overflow?
How reliable are floating-point comparisons?
What is the importance of c in your views?