/*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
What is an arrays?
What does *p++ do?
Explain how do you determine a file’s attributes?
Explain two-dimensional array.
What is #define?
In C language what is a 'dangling pointer'?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
How are 16- and 32-bit numbers stored?
where are auto variables stored? What are the characteristics of an auto variable?
What is the -> in c?
What is the difference between fread buffer() and fwrite buffer()?
What is the benefit of using an enum rather than a #define constant?
Explain 'far' and 'near' pointers in c.
How can you allocate arrays or structures bigger than 64K?
Why do we use main function?