Question: 2. Rewrite the psuedo code using linear nested if control structure. include a validation check to restrict product type to P or N in your
DECLARE productSku AS STRING DECLARE product TyPE as CHARACTER DECLARE purchasePrice, sellingPrice, markup AS REAL PRINT "Please enter product:" READ productSku PRINT "Please enter product type (P)erishible (N)on-perishable:" READ productType PRINT "Please enter product purchase price:" READ purchasePrice IF productType == ' P ' THEN Markup =0.05 ENDIF IF productType == ' N ' THEN Markup =0.15 ENDIF sellingPrice = purchasePrice (1.0+ markup ) PRINT product, "marked up by", markup, "suggested selling price", se
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
