C Program to find Salary of an Employee



 program to calculate salesman salary

Learn C - C tutorial - program to calculate salesman salary - C examples - C programs

C Program to find Salary of an Employee

Sample Code

#include<stdio.h>
#define BASE_SALARY 1500.00
#define BONUS_RATE 200.00
#define COMMISSION 0.02
int main()
{
    int quantity=56 ;
    float gross_salary, price=120 ;
    float bonus, commission ;
    bonus = BONUS_RATE * quantity ;
    commission = COMMISSION * quantity * price ;
    gross_salary = BASE_SALARY + bonus + commission;
    printf("\n");
    printf("Bonus = %6.2f\n", bonus) ;
    printf("Commission = %6.2f\n", commission) ;
    printf("Gross salary = %6.2f\n", gross_salary);
}

Output

Bonus= 11200.00
Commission = 134.40
Gross salary = 12834.40


View More Quick Examples


Related Searches to C Program to find Salary of an Employee