Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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) image text in transcribed
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

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions