/*program to calculate hra,da in salary if salary less than
10000 then hra15%,da13% otherwise hra20%,da18%/*
Answer Posted / riteshvk007
#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();
}
plese cheackout mistakes i can't run successfully this program
| Is This Answer Correct ? | 16 Yes | 4 No |
Post New Answer View All Answers
Why does the call char scanf work?
Explain Basic concepts of C language?
Explain about block scope in c?
What is the best way to store flag values in a program?
What is the meaning of typedef struct in c?
What is use of bit field?
Is Exception handling possible in c language?
List some applications of c programming language?
What is d scanf?
Are c and c++ the same?
Explain how does free() know explain how much memory to release?
How can I delete a file?
Explain what are compound statements?
What is the difference between array and pointer in c?
How can I dynamically allocate arrays?