Write an algorithm that displays the squares of the numbers


Exercises & iLabs Logic and Design

Exercise

Assignment (part A): Your goal is to solve the following simple programming exercise. Using a FOR loop, write an algorithm that displays the squares of the numbers 1 to 10 to console output. Thought provoking question: Do you need to accept input?

Assignment (part B): Using a pretest WHILE loop, write an algorithm that displays the squares of the numbers 1 to 10 to console output.

Assignment (part C): This is extra for those who desire a challenge. Accomplish the same output as above, but use a posttest WHILE loop this time.

Be sure to THINK about the logic and design first (IPO chart and or pseudocode), then code the Visual Logic command line processing.

Lab Fireworks Stand Checkout (Devry)

Your algorithm will keep track of a customer's purchases at the local fireworks stand. Customers will not know exactly how many items they will purchase, so using a for-loop on this lab is not allowed. Let's keep the rules simple.

Accept the dollar value of each item purchased from the user until the user is finished. When purchases are complete, enter a sentinel value of -1 (indicating the user has finished). If the item purchased is $50.00 or more, give your customer a 10% discount on the item purchased. Display all of the purchases to the customer with the original price and the discount price.

Be sure to THINK about the logic and design first (IPO chart and pseudocode), then code the Visual Logic command line processing.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Write an algorithm that displays the squares of the numbers
Reference No:- TGS01693313

Now Priced at $40 (50% Discount)

Recommended (91%)

Rated (4.3/5)