Last active
July 17, 2019 17:32
-
-
Save sachinsaxena25/cfde836873dd14c8062505c255484442 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(void){ | |
float basic_salary = 0.0f; | |
float hra = 0.0f; | |
float ta = 0.0f; | |
printf("please enter your basic salary:\n"); | |
scanf("%f", &basic_salary); | |
hra = (40.0f / 100.0f) * basic_salary; | |
ta = (20.0f / 100.0f) * basic_salary; | |
printf("Basic salary:%.2f\n", basic_salary); | |
printf("HRA:%.2f\n", hra); | |
printf("TA:%.2f\n", ta); | |
printf("Total:%.2f\n", (basic_salary+hra+ta)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BS HRA TA.c
, use names likeSalaryCalculator.c