In: Computer Science
1. In Raptor, Prompt for and input a saleswoman’s sales for the month (in dollars) and her commission rate (as a percentage). Output her commission for that month. Note that you will need to convert the percentage to a decimal. You will need the following variables: SalesAmount CommissionRate CommissionEarned You will need the following formula: CommissionEarned = SalesAmount * (CommissionRate/100).
// The below c program reads the amount of sales and the rate of commission and provides the commission earned
#include<stdio.h>
#include<conio.h>
int main()
{
// Declaration of the variables
float SalesAmount, CommissionRate, CommissionEarned;
// Reading the inputs
printf("\nEnter the amount of sales for the month ( in dollars ) : ");
scanf("%f",&SalesAmount);
printf("\nEnter the rate of commission ( in percentage ) : ");
scanf("%f", &CommissionRate);
// Calculating the commission
CommissionEarned = SalesAmount * ( CommissionRate/100);
// Clearing the screen
clrscr();
// Printing the details
printf( "\nHer amount of sales for the month : %f",SalesAmount);
printf("\nRate of commission : %f", CommissionRate);
printf("\nCommission earned : %f",CommissionEarned);
return 0;
}