/*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


Please Help Members By Posting Answers For Below Questions

Where are the auto variables stored?

731


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

779


What is the difference between ++a and a++?

816


Difference between macros and inline functions? Can a function be forced as inline?

791


Whats s or c mean?

685






.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; }

2140


Explain what is dynamic data structure?

759


Explain the difference between malloc() and calloc() function?

684


Is c easy to learn?

649


Explain union. What are its advantages?

704


How can I call a function with an argument list built up at run time?

740


How are portions of a program disabled in demo versions?

860


What is the purpose of the statement: strcat (S2, S1)?

722


Write a code to generate divisors of an integer?

722


How many types of sorting are there in c?

706