/*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
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
Does * p ++ increment p or what it points to?
What is the difference between null pointer and wild pointer?
What is the difference between c &c++?
What is advantage of pointer in c?
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
The difference between printf and fprintf is ?
Which type of language is c?
How do you sort filenames in a directory?
What does printf does?
Why is it that not all header files are declared in every C program?
Where is volatile variable stored?
Why c is called top down?
What does volatile do?
Tell us the use of fflush() function in c language?