## agaba

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

## necrolin 94

I don't mind helping you out but you're not asking for help. You're asking someone to do your homework for you. Try it out on your own. Show us the source code you have and we'll help you fix the mistakes.

commented: Well said +36

## agaba

I don't mind helping you out but you're not asking for help. You're asking someone to do your homework for you. Try it out on your own. Show us the source code you have and we'll help you fix the mistakes.

Can you just give few point where to start , I dont need code just give some direction, Thanks

## firstPerson 761

Here is a comment on the comments (just a few):

input qty // get input from user, by creating a new variable and cin >>variable

while qty > 0 //start a loop, with the conditional statement being while qty > 0

input size// ask user to input, same as step 1

//You need to create a calculareScrap function that does what it
//needs to do.
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

## agaba

Here is a comment on the comments (just a few):

input qty // get input from user, by creating a new variable and cin >>variable

while qty > 0 //start a loop, with the conditional statement being while qty > 0

input size// ask user to input, same as step 1

//You need to create a calculareScrap function that does what it
//needs to do.
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

so you mean i have to write 3 functions , one for each or to have function with 3 return

## firstPerson 761

Just 1 function applied 3 times

## agaba

Just 1 function applied 3 times

ok , what about floor and ceiling

## firstPerson 761

What do you mean by floor and ceiling? The function?

## agaba

at the end

call floor using per stock

call ceiling using qty needed

## firstPerson 761

how about you give it a start, from the top. Follow each step, and
see where you get.