/*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
What is abstract data structure in c?
What is static volatile in c?
What is "Hungarian Notation"?
Write a program to swap two numbers without using a temporary variable?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
What is the condition that is applied with ?: Operator?
Why is extern used in c?
How can I make it pause before closing the program output window?
What is a static variable in c?
Differentiate between ordinary variable and pointer in c.
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
explain what are pointers?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Why do we use c for the speed of light?
Can you mix old-style and new-style function syntax?