# CPP Homework Algorithms C101 - 41747

Solution Posted by

Rating : (19)A+
Solution Detail
Price: \$12.00
Request Description

C101 Homework #1

Write an algorithm for the following problems: (You do not need to write a program for these

problems yet). The algorithm can just be hand written, but make sure it is readable and if

multiple pages make sure to staple them together.

1) We want to know how many cubic feet, or the volume, are in a rectangular solid of a given

Height, Width, and Length. ( Hint , the Height, Width and Length are inputs to problem, and

the cubic foot is the output, and number of cubic feet is equal to Length times Width times

Height )

2) Given the Radius (R) of a circle you want to calculate the Area (A) and Circumference (C) of

that circle. The equations are for Area, A = pR2 and Circumference, C = 2pR.

3) User enters an integer and problem tells user if the number is between 1 and 100, and if it is

then display “Good Input”, else displays “Bad Input”.

4) A problem that will convert a total number of days into the corresponding number of years

and days left over. For example, if you enter 1254 days, then it would display “3 years and 159

days”. (Hint, there are 365 days in one year, and use the / (div) and % (mod) operators)

5) A problem that determines if an entered number is negative or positive, and continues to have

user enter numbers and display appropriate response until user enters a zero. Will keep looping

until the user enters 0.

6) A problem that has user continue to enter weight of people and keeps a running total weight of

all the people and also keeps track of the number of people entered. This will continue until a

weight entered is less then or equal to zero. Problem will then display the average weight of all

the people.

Solution Description

Attachments