C Program to Calculate Gross salary

Write a C Program to Find Total Salary ?

In our last blog we learn how to write a c program to check whether the number is prime or not.  In this article, we will show you, how to write a C Program to Calculate Gross Salary of an Employee with example.This program will read Basic Salary of an employee, calculate other parts of the salary on percent basic and finally print the Gross Salary of the employee.This was another simple program which has been taught to the beginners.

C Program Code:
#include<stdio.h>
int gross( int basic_salary)
{
int total_salary;
total_salary=basic_salary+.1*basic_salary+.2*basic_salary;
}
int main()
{
int basic_salary,total_salary;
printf(“enter value basic_salary”);
scanf(“%d”,&basic_salary);
total_salary=gross(basic_salary);
printf(“%d=total_salary”,total_salary);
return 0;
}

If you have any doubt or queries regarding C Programming Language, feel free to ask anytime or just leave a comment.