Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions