WBRK = 15
W1 = .50
W2 = .25
WDSC = 125
DSC = .35
read category,words,name
cost = (words<=WBRK) ? (words*W1) : (WBRK*W1 + (words-WBRK)*W2)
if words > WDSC cost *= (1-DSC)
display category,words,name,cost
Using pseudocode or a flowchart write a program that does the following:
Allow the end user to enter the category the ad will appear in (ex. Automobiles), Number of words and Customer Name
Calculate the cost based on 50 cents per word for the first 15 and 25 cents for each word over 15
Offer a discount of 35% if the ad is over 125 words
Display all of the input data and the price for the ad
Use CONSTANTS for specified values above
1 answer