Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

PROGRAM TO CALCULATE BONUS, COMMISSION AND GROSS SALARY OF A SALESMAN

Posted By: Madison Campbell     Category: C Programming     Views: 7711

WRITE A PROGRAM TO CALCULATE BONUS, COMMISSION AND GROSS SALARY OF A SALESMAN.

Code for PROGRAM TO CALCULATE BONUS, COMMISSION AND GROSS SALARY OF A SALESMAN in C Programming

#include<stdio.h>
#include<conio.h>
#define BASE_SALARY   1500.00
#define BONUS_RATE    200.00
#define COMMISSION       0.02
void main()
{
   int quantity;
   float gross_salary,price;
   float bonus,commission;
   clrscr();

   printf("Input number sold and price\n");
   scanf("%d  %f",&quantity,&price);

   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-slary = %6.2f\n",gross_salary);


getch();
}
  
Share: 



Madison Campbell
Madison Campbell author of PROGRAM TO CALCULATE BONUS, COMMISSION AND GROSS SALARY OF A SALESMAN is from Toronto, Canada.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!