input qty

while qty > 0

input size

call Calculate Scrap using 10 to get scrap 10, qty needed for 10

call Calculate Scrap using 25 to get scrap 25, qty needed for 25

call Calculate Scrap using 40 to get scrap 40, qty needed for 40

if scrap 10 < scrap 25 and < scrap 40

set qty needed to qty needed for 10

set price to 2.10

else if scrap 25 < scrap 10 and < scrap 40

set qty needed to qty needed for 25

set price to 4.90

else

set qty needed to qty needed for 40

set price to 7.51

multiply qty needed by price to get cost

multiply cost by 1.75

multiply cost by .08 to get tax

add tax to cost to get charges

output cost, tax, charges

input qty

Calculate Scrap

divide stock by size to get per stock

call floor using per stock

if size *(per stock + 1/16) > stock

subtract 1 from per stock

divide qty by per stock to get qty needed

call ceiling using qty needed

multiply per stock by size to get shipped

subtract shipped from stock to get scrap

multiply scrap by qty needed

and second

Encryption

input a four digit integer

while integer > 0

divide integer by 1000 to get temp

add 7 to temp

divide (modulus) temp by 10 to get new first digit

divide (modulus) integer by 1000 to get temp

divide temp by 100

add 7 to temp

divide (modulus) by 10 to get new second digit

divide (modulus) integer by 1000 to get temp

divide (modulus)temp by 100

divide temp by 10

add 7 to temp

divide (modulus) by 10 to get new third digit

divide (modulus) integer by 1000 to get temp

divide (modulus) temp by 100

divide (modulus) temp by 10

add 7 to temp

divide (modulus) by 10 to get new fourth digit

set temp to new first digit swap first and third digits

multiply new third digit by 1000 to get first

multiply temp by 10 to get third

set temp to new second digit swap second and fourth digits

multiply new fourth digit by 100 to get new second digit

set fourth digit to temp

add first, second, third, fourth to get encrypted number

output encrypted number

input four digit integer