(Sales Commission Calculator) One large chemical company pays its salespeople on a commission basis. The salespeople receive P200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells P5000 worth of chemicals in a week receives P200 plus 9% of P5000, or a total of P650. Develop a program that will input each salesperson’s gross sales for last week and will calculate and display that salesperson’s earnings. Process one salesperson's figures at a time.
Mon May 20 2024 12:17:12 GMT+0000 (Coordinated Universal Time)
Saved by
@JC
#include <stdio.h>
#include <dos.h>
#include <conio.h>
int main()
{
float grossSales, salary, baseSalary=200, commissionRate=.09;
clrscr();
gotoxy(25,10);
printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
gotoxy(25,15);
printf("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
gotoxy(25,11);
printf("X X");
gotoxy(25,12);
printf("X X");
gotoxy(25,13);
printf("X X");
gotoxy(25,14);
printf("X X");
gotoxy(30, 12);
printf("Enter the Gross Sales: ");
scanf("%f" , &grossSales);
salary = baseSalary + (grossSales * commissionRate);
gotoxy(30, 13);
printf("The salary is: %.2f" , salary);
getch();
return 0;
}
content_copyCOPY
Comments