Sie sind auf Seite 1von 4

Option B

Shahine Porter

Input Process Output

Three Numbers 1. Accept three numbers Total students who came to I.T
class.
2. Add three numbers to get
total

3. Display total

Pseudocode: I.TStudents

{This program will accept three numbers and tell the user the total amount of
students who came to I.T class. Written by Shahine Porter October, 2016}

DECLARATIONS

Variables

num1, num2, num3 - data type Integer

START

display “Enter three numbers”

read num1, num2, num3

total ← num1 + num2 + num3

display “The total amount of students are”, total

STOP
Option B

Shahine Porter

Input Process Output


Option B

Shahine Porter

Price 1. Accept price Price of buying 10 of an item

2. Multiply price by 10 to get


product.

3. Multiply the product by


0.05 to get discount price.

4. Subtract the discount


price from the product to
get total discount price.

5. Multiply the total discount


price by 0.12 to get tax.

6. Add total discount price


and tax to get full final
price.

7. Display full final price.

Pseudocode Algorithm: CostofTen

{This program will accept a price and tell the user their price of buying 10 of an item. Written by
Shahine Porter - October, 2016}

DECLARATIONS

Variables

Price - data type real

Constants

Discount = 0.05

Tax= 0.12

START

display “Enter price”

read price

product ← price * 10

discount price← Product * discount

total discount price← product - discount price

tax price← total discount price * tax

full price←total discount price + tax price

display “The total amount is”, full price


Option B

Shahine Porter

STOP

Das könnte Ihnen auch gefallen