/*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
Explain the difference between ++u and u++?
How can I send mail from within a c program?
What is function definition in c?
What is the meaning of c in c language?
What do you mean by scope of a variable in c?
In C language what is a 'dangling pointer'?
What is cohesion in c?
What does %p mean c?
What is union and structure in c?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Can we access array using pointer in c language?
Explain what is the difference between text files and binary files?
Why c is faster than c++?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
if p is a string contained in a string?