Assignment 3 - CIS 110 David Kegler Assignment 3 Module...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 110 David Kegler 4/29/2011 Assignment 3 Module main () // Global constants Declare Integer UNIT_PRICE = 99 // Declare variables Declare real unitsPurchasing = 0 // Get the number of units the customer is purchasing Display “How many software packages would you like to purchase?” Input unitsPurchasing If unitsPurchasing <=9 THEN Call noDiscount Else If unitsPurchasing >=10 AND <=19 THEN Call 10_19Discount Else If unitsPurchasing >=20 AND <=49 THEN Call 20_49Discount Else If unitsPurchasing >=50 AND <=99 THEN Call 50_99Discount Else If unitsPurchasing >=100 THEN Call 100orMoreDiscount End If End If End If End If End If End Module // No Discount Module noDiscount Declare Real result Set result = unitsPurchasing * UNIT_PRICE Display “Your price per unit is $”, UNIT_PRICE Display “Your total purchase price is $”, result End Module // 10_19 Discount, 20% Module 10_19Discount Declare Real pricePerUnit, totalPrice Set pricePerUnit = UNIT_PRICE * 0.8 Set totalPrice = pricePerUnit * unitsPurchasing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/17/2012 for the course CIS 110 110 taught by Professor Tucker during the Spring '11 term at Strayer.

Page1 / 2

Assignment 3 - CIS 110 David Kegler Assignment 3 Module...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online