/*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()
{
int bs,da,hra;
clrscr();
printf("\n enter the basic salary of employee");
scanf("%d",&bs);
if (bs<10000)
{
printf("\n da : %d",da=bs*15/100);
printf("\n hra : %d",hra=bs*13/100);
printf("\n net salary: %d",da+hra);
}
else
{
printf("\n da : %d",da=bs*20/100);
printf("\n hra : %d",hra=bs*18/100);
printf("\n net salary: %d",da+hra);
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is extern c used for?
How can I write a function that takes a format string and a variable number of arguments?
What is the difference between #include
Can we change the value of constant variable in c?
What are the advantages of union?
What is getch() function?
Is c dynamically typed?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
What is omp_num_threads?
How does struct work in c?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
What is formal argument?
Explain which function in c can be used to append a string to another string?
can anyone please tell about the nested interrupts?
What is dynamic variable in c?