C Program for calculation of Gross Salary

How to write a C Program for calculation of Gross Salary in C Programming Language ?


Solution:

  1. This program takes into account the allowances of a particular candidate and then finally counts the Gross Salary.
  2. The value of the Basic Salary is entered through the keyboard.


Lara's basic salary is input through the keyboard.
Her dearness allowance is 35% of basic salary, and house rent allowance is
25% of basic salary. Write a program to calculate her gross salary.


  1. #include<stdio.h>
  2. main ()
  3. {
  4. int basic;
  5. float gross;
  6. printf("Enter your Basic Salary: ");
  7. scanf("%d", &basic);
  8. gross = basic+(0.35*basic)+(0.25*basic);
  9. printf("Your Gross Salary is: %f",gross);
  10. }


Learn More :