C++ Algorithms



Posted : 11 months ago

Using the algorithms from the Initial Algorithm Testing Assignment (repeated below) complete the form to write the code to represent each line of the algorithm. Also complete the Identifiers/Types box with appropriate information.

Algorithm #1                           Code                                     Identifiers/types

Get the length and the width from user

 

Area = length times width

 

Perimeter = 2 times length + 2 times width

 

Print the Area

 

Print the Perimeter

 

 

 

 

 

 

 

 

 

 

Algorithm #2                           Code                                     Identifiers/types

Get the payrate from user

 

Get the hours worked from user

 

Gross = payrate times hours worked

 

Taxes = Gross time .12 (given 12% tax rate)

 

Net = Gross – Taxes

 

Print Net

 

 

 

 

 

 

 

 

Algorithm #3                           Code                                     Identifiers/types

(Start by fixing the logic problem)

Get 4 test scores from the user (test1, test2, test3, test4)

 

Average = test1 + test2 + test3 + test4 / 4

 

Print Average

 

 

 

 

 




Files Attached

No files attached