1. Write a program to read thr

Sigchi4life
Category:
Programming
Price: $35 USD

Question description

1. Write a program to read three values, calculate their sum and their average and print the results as:
"The sum is ", sum
"The average is ", average

2. Write a program to read a value, print its 3/4, 1/2, and 1/4. Declare four variables with appropriate names to store the original value, three quarters of the values, half of the value and quarter of the value.

3. Write a program that will read a radius of a sphere, send the radius to function by the name sphereVolume to return the volume of the sphere (find the formula of the volume of sphere in the WWW). Print the volume in the original program (main program where you have: Start and Stop).

4. Write a program that will read 5 sales. After finding their subtotals, calculate the sale discount based on these criteria s:

if the subtotal is >= 10000, the discount is 15%
else if the subtotal is >= 7500 and < 10000, the discount is 10%
else if the subtotal is >= 5000 and < 75000, the discount is 7%
else if the subtotal is >= 2500 and < 5000, then discount is 5%
else the discount is 3%
Print the dicousntedAmount, the TaxAmount based on 7.5% taxRate, and the total.

5. Write a program using for-loop to add values between 50 and 100 (Hint: you can initialize a variable to any value instead of one or zero)

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Cornell University
PREMIUM TUTOR
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1819 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors