Question: ALL CODES BELOW MUST BE IN FORMAT OF C PROGRAMMING Problem 1. One large chemical company pays its salespeople on a commission basis. The salespeople

ALL CODES BELOW MUST BE IN FORMAT OF C PROGRAMMING

Problem 1.

One large chemical company pays its salespeople on a commission 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 C program that will input each salespersons gross sales for last week and will calculate and display that salespersons earnings. Process one salesperson's figures at a time.

Problem 2.

Calculate the value of ALL CODES BELOW MUST BE IN FORMAT OF C PROGRAMMING Problem 1. from the infinite series One large chemical company pays its salespeople on a commission basis. The = 4 (4 /3) + (4/5) (4/7) + (4/9) (4/11) + Print a table that shows the value of salespeople receive $200 per week plus 9% of their gross sales for approximated by one term of this series, by two terms, by three terms, and so on. How many terms of this series do you have to use before you first get 3.14? 3.141? 3.1415? 3.14159?

Problem 3.

Write a C program that prints the following diamond shape. You may use printf statements that print either a single asterisk (*) or a single blank. Maximize your use of iteration (with nested for statement) and minimize the number of printf statements. Make sure that you program can print diamonds with the height (a positive odd value less than 20) entered by the user. For instance, height of the following diamond is 9.

that week. For example, a salesperson who sells $5000 worth of chemicals

Problem 4.

Write a C program that sums a sequence of numbers, integer or float (double). Assume that the first input is an integer number the specifies the number of values remaining to be entered. Your program should read only one value each time scanf is executed. A typical input sequence and its corresponding output might be:

Input: 5 12 1943 48.23 16 -73

Output: 1946.23

From the above input, 5 indicates that the subsequent five values are to be summed.

Problem 5.

Write a C program that calculates and prints the average of several integers. Assume the last value read with scanf is the sentinel 9999. A typical input sequence might be:

Input: 410 83 51 -9 13 9999

Output: 109.6

From the above input, 9999 indicates the sentinel value and therefore output is the average of the five integers entered by the user before that sentinel value.

Problem 6.

The factorial of a positive integer n (written as n!) is equal to the product of the positive integers from 1 to n. For instance, 3! = 3 * 2 * 1 = 6. Write a C program that evaluates the factorials of the integers from 1 to 10. Print the results like the following format:

1! = 1

2! = 2

3! = 6

4! = 24

Change the range of the numbers to be able to compute the factorials of the numbers from 15 to 20 and explain what difficulty might prevent you from calculating the factorial of numbers like 20?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!