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

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 solution (10 marks) 2. Rewrite the psuedo code using linear nested if control structure. include

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!