Question

In: Computer Science

1. In Raptor, Prompt for and input a saleswoman’s sales for the month (in dollars) and...

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).

Solutions

Expert Solution

// 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;

}

        


Related Solutions

Using RAPTOR create a program that allows the user to input a list of first names...
Using RAPTOR create a program that allows the user to input a list of first names in on array and last names into a parallel array. Input should be terminated when the user enters a sentinel character. the output should be a list of email address where the address is of the following form: [email protected]
Prompt the user for their name, get and store the user input. Prompt the user for...
Prompt the user for their name, get and store the user input. Prompt the user for their age, get and store the user input. We will assume that the user will enter a positive integer and will do no error checking for valid input. Determine and store a movie ticket price based on the user's age. If their age is 12 or under, the ticket price is $5. If their age is between 13 and 64, inclusive, the ticket price...
Prompt the user to input their lucky number. Upon getting the users input, validate that the...
Prompt the user to input their lucky number. Upon getting the users input, validate that the input is a valid number using Int32.TryParse (more info can be found at https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/how-to-convert-a-string-to-a-number (Links to an external site.)). If the input is not a valid number, output a message to the user stating that you are sorry but you are unable to run the FizzBuzz process due to the input not being a valid number. If the input is valid, you are clear...
PROBLEM ONE The following information pertains to Life Corporation Month Sales (units) Sales (dollars) July 1,500...
PROBLEM ONE The following information pertains to Life Corporation Month Sales (units) Sales (dollars) July 1,500 $30,000 August 1,700 34,000 September 1,600 32,000 October 1,700 40,800 November 2,100 54,600 December 2,350 51,700 January 2,300 57,000 February 1,900 51,000 March 1,750 44,000 April 1,600 41,600 May 1,500 30,000 June 1,400 32,200 Of sales, 30% are in cash with the remainder on account. Accounts Receivable is collected from customers in the following manner: Month of sale 30% Month following sale 60% Second...
23-64) Let Yt be the sales during month t (in thousands of dollars) for a photography...
23-64) Let Yt be the sales during month t (in thousands of dollars) for a photography studio, and let Pt be the price charged for portraits during month t. The data are in the file Week 4 Assignment Chapter 12 Problem 64. Use regression to fit the following model to these data: Yt = a + b1Yt−1 + b2Pt + et This equation indicates that last month’s sales and the current month’s price are explanatory variables. The last term, et,...
Create a C++ program that will prompt the user to input an integer number and output...
Create a C++ program that will prompt the user to input an integer number and output the corresponding number to its numerical words. (From 0-1000000 only) **Please only use #include <iostream>, switch and if-else statements only and do not use string storing for the conversion in words. Thank you.** **Our class is still discussing on the basics of programming. Please focus only on the basics. Thank you.** Example outputs: Enter a number: 68954 Sixty Eight Thousand Nine Hundred Fifty Four...
Create a C++ program that will prompt the user to input an integer number and output...
Create a C++ program that will prompt the user to input an integer number and output the corresponding number to its numerical words. (From 0-1000000 only) **Please only use #include <iostream> and switch and if-else statements only. Thank you. Ex. Enter a number: 68954 Sixty Eight Thousand Nine Hundred Fifty Four Enter a number: 100000 One Hundred Thousand Enter a number: -2 Number should be from 0-1000000 only
Create a C++ program that will prompt the user to input an positive integer number and...
Create a C++ program that will prompt the user to input an positive integer number and output the corresponding number to words. Check all possible invalid input data. (Please use only switch or if-else statements. Thank you.)
Write a program that will input the information for 2 different employees. Prompt the user for...
Write a program that will input the information for 2 different employees. Prompt the user for the first employee’s name, hours worked and rate. Compute the salary and display it. Do the same for the second and third employees. Then, display a message to the effect that the highest salary is whatever and the lowest salary is whatever. When the program runs, the following should display information should line up just as I have it below. E:\> java Quiz4 Name:...
Hello, this is for C#. Initialize variable balance to 1000 dollars. Prompt the player to enter...
Hello, this is for C#. Initialize variable balance to 1000 dollars. Prompt the player to enter a wager. Check that wager is less than or equal to balance, and if it’s not, have the user reenter wager until a valid wager is entered. After a correct wager is entered, run one game of craps. If the player wins, increase balance by wager and display the new balance. If the player loses, decrease balance by wager, display the new balance, check...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT