Skip to content

Commit 567b491

Browse files
first c program
0 parents  commit 567b491

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

P1.c

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
Author :- Rajeshwari
3+
purpose :- solving problem
4+
Date :- 29/09/21 , Wednesday .
5+
Date of modification :- 19/12/21 , Sunday .
6+
Problem statement
7+
8+
write a program to accept basic salary of an employee and print gross salary by adding 40%(TA) Travelling Allowence,
9+
25% Dearness Allowence(DA), 20% House Rent Allowence
10+
11+
*/
12+
#include<stdio.h>
13+
#include<conio.h>
14+
void main()
15+
{
16+
int salary,a,b,c,t;
17+
printf("Enter Your Salary Amount:-\n");
18+
scanf("%d",&salary);
19+
a=(salary*40)/100;
20+
b=(salary*25)/100;
21+
c=(salary*20)/100;
22+
t= a+b+c+salary;
23+
printf("Travelling allowence is 40 persent that is equal to %d\n",a);
24+
printf("Dearness allowence is 25 persent that is equal to %d\n",b);
25+
printf("House Rent allowence is 20 persent that is equal to %d\n",c);
26+
printf("Your Total salary is %d",t);
27+
28+
}
29+

0 commit comments

Comments
 (0)