Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve and Construct flowgorithm using http://www.flowgorithm.org/ Program 67 1 I Global constant for the discount percentage. 2Conetant Real DISCOUNT PERCENTAGE 0.20 11 The matn module

Solve and Construct flowgorithm using http://www.flowgorithm.org/ image text in transcribed
Program 67 1 I Global constant for the discount percentage. 2Conetant Real DISCOUNT PERCENTAGE 0.20 11 The matn module 1s the progran's starting potne Local vartables to hold regular and sale prices Declare Real regularPrice, salePrioe 9 Cet the items regular price 0 Set regularPrice getRegularrice) 12 1/ Calculate the sale price 13 Set salePrice regularPrice -discount (rogularPrice) 14 Display the sale price. Display "The sale price 1s ". salefrice 15 17 Knd Hodule 19 / The getRegularPrice funetion prompts the 20 user to enter an 1te's regular price and 21 II returns that value as a Real 22 Funetion Real getRegularPr1ce( 23 Local vartable to hold the price. 24 Declare Real price 26 Cet the regular price 2 Diaplay "Rnter the itom's regular price- 8 Input price 29 30 Retarn the rogular price Return price 32 nd Functton 4 I1 The discount funet.ion accepts an item's price 5 I/ as an argument and returns the amount of the 6 I discount specified by DISCOUNT PERCENENGR 7 Funetion Real discount (Real price) 8 Return priee DISCOUNT PERCENTAGE 39 End Punct.ton Program Output (with Input Shown in Bold) Enter the itm's regular price 100.00 [Enter The sale price is $80

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

1. What are your creative strengths?

Answered: 1 week ago