/*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
Where are the auto variables stored?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
What is the difference between ++a and a++?
Difference between macros and inline functions? Can a function be forced as inline?
Whats s or c mean?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
Explain what is dynamic data structure?
Explain the difference between malloc() and calloc() function?
Is c easy to learn?
Explain union. What are its advantages?
How can I call a function with an argument list built up at run time?
How are portions of a program disabled in demo versions?
What is the purpose of the statement: strcat (S2, S1)?
Write a code to generate divisors of an integer?
How many types of sorting are there in c?