Question

.. 1. (5 points) Design an algorithm that will input sales volume records (until -1) from the user and print the sales commis

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Algorithm for computing sales commision:

Function Main
Declare Integer Array number[10], volume[10]
Declare String Array names[10]
Declare Real Array commision[10]
  
Output "Enter number,name and volume of sales person"
Assign i = 0
Assign option = 1
Loop
Output "Enter number,name and volume of sales person"
Input number[i]
Input names[i]
Input volume[i]
If commision[i]<200
Assign rate = 5
False:
If commision>200 && commision<=1000
Assign rate = 8
False:
If commision>1000 && commision<=2000
Assign rate = 10
False:
Assign rate = 12
End
End
End
Assign commision[i] = rate*volume
Assign i = i+1
Output "Enter -1 to stop input, press any key to continue:"
Input option
Do option!=-1
For k = 0 to i-1
Output number[k]&" "&names[k]&" "&volume[k] &" "&commision[k]
End
End

Add a comment
Know the answer?
Add Answer to:
.. 1. (5 points) Design an algorithm that will input sales volume records (until -1) from...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In C++. Write another program in file B2.cpp to calculate and print the total sales of...

    In C++. Write another program in file B2.cpp to calculate and print the total sales of each product by each salesperson. Read the sales slips from the file Salesslips.txt (or for partial points, in case your program Bl.cpp does not work correctly, from an array with the same data, initialized in your main program) and calculate the total sales of each product by each salesperson. Accumulate the total sales of each product by each salesperson in a two- dimensional array...

  • This is a C programming HW Homework details Homework 1A: Problem # 3.18 (5 points) 3.18...

    This is a C programming HW Homework details Homework 1A: Problem # 3.18 (5 points) 3.18 (Sales Commission Calculator) One large chemical company pays its salespeople on a com- mission basis. The salespeople receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Develop a program that will input each salesperson's gross sales...

  • Use program control statements in the following exercises: Question 1 . Write pseudocode for the following:...

    Use program control statements in the following exercises: Question 1 . Write pseudocode for the following: • Input a time in seconds. • Convert this time to hours, minutes, and seconds and print the result as shown in the following example: 2 300 seconds converts to 0 hours, 38 minutes, 20 seconds. Question 2. The voting for a company chairperson is recorded by entering the numbers 1 to 5 at the keyboard, depending on which of the five candidates secured...

  • Question2 uses structured design implemented in C. Array of records (structs) with file I/O is needed....

    Question2 uses structured design implemented in C. Array of records (structs) with file I/O is needed. The program takes two inputs at a time. The name of a person, and, the coin value as an integer in the range 5 to 95. Input coin values should always be divisible by 5 (integer division). Names are one word strings. An example input is: Jane 30 This input line indicates that 30 cents change is to be given to Jane. Output change...

  • Design a program(Creating a RAPTOR flowchart) that will read a file of employee records containing employee...

    Design a program(Creating a RAPTOR flowchart) that will read a file of employee records containing employee number, employee name, hourly pay rate, regular hours worked and overtime hours worked. The company pays its employees weekly, according to the following rules: regular pay = regular hours worked × hourly rate of pay overtime pay = overtime hours worked × hourly rate of pay × 1.5 total pay = regular pay + overtime pay Your program is to read the input data...

  • C++ Objective: Write a program to read a pre-specified file containing salespersons' names and daily sales...

    C++ Objective: Write a program to read a pre-specified file containing salespersons' names and daily sales for some number of weeks. It will create an output file with a file name you have gotten from the user that will hold a summary of sales data. Specifications: 1. You should do a functional decomposition to identify the functions that you will use in the program. These should include reading and writing the files, tallying and showing statistics, etc. 2. The program...

  • Implement a software program in C++ t stores and searches the Student records using double-hashing algorithm.  Double...

    Implement a software program in C++ t stores and searches the Student records using double-hashing algorithm.  Double hashing uses the idea of applying a second hash function to key when a collision occurs.   The software program will be based on the following requirements: Development Environment: If the software program is written in C++, its project must be created using Microsoft Visual Studio 2017. If the software program is written in Java, its project must be created using NetBeans v8.2. Algorithm: If...

  • Objectives – to practice these new concepts: decision-making with if, if-else, if-else-if-… switch data validation for...

    Objectives – to practice these new concepts: decision-making with if, if-else, if-else-if-… switch data validation for user input using a while (or while/do) loop nicely formatted output report with printf and format strings multiple input data sets using a while (or while/do) loop named constants PROJECT OVERVIEW This project provides a detailed payroll report for the sales staff at TheLaptopShop. The company has 3 tiers of salespeople: low, middle, high (designated by L, M, H) – based on their past...

  • C++ Programming Programming Project Outcomes:  Understand and use C++ functions for procedural abstraction and Functional...

    C++ Programming Programming Project Outcomes:  Understand and use C++ functions for procedural abstraction and Functional Decomposition  Develop some functions for generating numerical data from numerical inputs  Understand and utilize file input and file output to perform computing tasks Requirements: 1. You should do a functional decomposition to identify the functions that you will use in the program. These should include reading and writing the files, tallying and showing statistics, etc. 2. The program should prompt the user...

  • // includes [1 mark] // structure definition [5 marks] // global variables [2 marks] // function...

    // includes [1 mark] // structure definition [5 marks] // global variables [2 marks] // function prototypes [2 marks] // main function (no menu required – just invoke the function calls to // satisfy the requested program sequence) [5 marks] // Code all necessary functions [25 marks] Q6. [40 MARKS] Write and document a complete C program to satisfy the following requirements. Given a sequential text file that has the following layout where each line is one record containing the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT