-
Notifications
You must be signed in to change notification settings - Fork 20
/
Salary.c
31 lines (25 loc) · 813 Bytes
/
Salary.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/******************************************************
* File : Salary.c
* Description : C Program to claculate the gross salary of an employee
* Author : Sarju S
* Version : 1.0
* Date : 28/05/2021
* ***************************************************/
#include<stdio.h>
int main(){
float basicSalary;
float da,hra;
float grossSalary;
printf("\nEnter the basic salary of Ramesh:");
scanf("%f",&basicSalary);
//DA is 40% of Basic Salary
da = basicSalary*0.40;
//HRA is 20% of Basic Salary
hra = basicSalary*0.20;
grossSalary = basicSalary + da + hra;
printf("\nRamesh's Salary Statement");
printf("\nDA=%f",da);
printf("\nHRA=%f",hra);
printf("\nGross Salary of Ramesh:%f",grossSalary);
return 0;
}