SET OF PROGRAMS

This blog provided "C" programs for beginners. Providing c programs for students.enjoy this blog.this blog include many c programs for engineering students, IT engineering students and programmers this blog is very useful.this blog post daily 1-5 programs for you.this programs use full for devlop games devlops application and much more. This blog programs useful for projects because all programs post with explanations.

Search Bar

Ads Here

Saturday, 5 May 2018

Calculate gross salary from given basic pay

C program of calculate gross salary from
Given basic pay
#include<stdio.h>
main(){

  float basicPay,dearnessAllowance,houseRentAllowance,grossSalary,providentFund;
  printf("Enter Basic Pay \n");
  scanf("%f",&basicPay);

  houseRentAllowance=0.2*basicPay;
  dearnessAllowance=0.4*basicPay;
  providentFund=0.12*basicPay;
  grossSalary=basicPay+dearnessAllowance+houseRentAllowance+providentFund;

  printf("Basic Pay=%.2f\n",basicPay);
  printf("Dearness Allowance=%.2f\n",dearnessAllowance);
  printf("House Rent Allowance=%.2f\n",houseRentAllowance);
         printf("ProvidentFund=%.2f\n",providentFund);
  printf("Gross Salary=%.2f\n",grossSalary);
}
Output:
Enter Basic Pay
10000
Basic Pay=10000.00
Dearness Allowance=4000.00
House Rent Allowance=2000.00
ProvidentFund=1200.00
Gross Salary=17200.00
Explanation:
//Coming Soon..

No comments:

Post a Comment