/*program to calculate hra,da in salary if salary less than
10000 then hra15%,da13% otherwise hra20%,da18%/*
Answer Posted / rama krishna sidhartha
#include<stdio.h>
#include<conio.h>
void main()
{
long int bs,da,hra;
clrscr();
printf("\n enter the basic salary of employee=");
scanf("%f",&bs);
if (bs<10000)
{
printf("\n da : %f",da=(bs*15)/100);
printf("\n hra : %f",hra=(bs*13)/100);
printf("\n net salary: %f",da+hra);
}
else
{
printf("\n da : %f",da=(bs*20)/100);
printf("\n hra : %f",hra=(bs*18)/100);
printf("\n net salary: %f",da+hra);
}
getch();
}
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What are different storage class specifiers in c?
What is difference between constant pointer and constant variable?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
Explain how are portions of a program disabled in demo versions?
If null and 0 are equivalent as null pointer constants, which should I use?
What is typedef?
What is variables in c?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
Hi can anyone tell what is a start up code?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What are the types of type qualifiers in c?
Explain what is meant by high-order and low-order bytes?
Is fortran still used in 2018?
What is 'bus error'?