Question: 1 Modify the algorithm in Example 1.2.1 so that the output also includes the position in the list where the smallest number occurs. 2 Write

 1 Modify the algorithm in Example 1.2.1 so that the output

1 Modify the algorithm in Example 1.2.1 so that the output also includes the position in the list where the smallest number occurs. 2 Write an algorithm to input a period of time in hours, minutes and seconds, and output the time in seconds. Write an algorithm to input a number n, then calculate 12 + 22 + 32 + ... + n2, the sum of the first n perfect squares, and output the result. 4 Write an algorithm to input the price of a purchase and the amount tendered, and calculate the change due. An appropriate message should be output if the amount tendered is less than the purchase price. 5 Write an algorithm to calculate the tax payable on a given taxable income, according to the following rules: Taxable income Tax $1-$5400 0 $5401-$20700 $20701-$38000 $38001-$50000 O plus 20 cents for each $1 over $5400 $3060 plus 34 cents for each $1 over $20700 $8942 plus 43 cents for each $1 over $38000 $14102 plus 47 cents for each $1 over $50000 $50001 and over

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!