Hi, I am new to studying IT and i have an assignment question which is giving me trouble.
A little off topic, but if anyone here knows their pseudocode I have a question for you. I need to design an algorithm that calculates how much profit can be made by multiplying the remaining weight of stock and the price paid per KG. That part isn't too difficult however I need to apply profit margins: if the product was bought within 7 days only x% of it is profit, more than 7 days ago y% of it is profit.
Would appreciate any help and sorry for being off topic and a noob!!!
PSEUDOCODE HELP
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: PSEUDOCODE HELP
Hi mgorg199,
maybe you want to explain what this has to do with Livecode?
In the meantime I can give you some hints, although you already answered your own question!
And since this is not really OFF-TOPIC I will move the thread to the beginners section.
Best
Klaus
maybe you want to explain what this has to do with Livecode?
In the meantime I can give you some hints, although you already answered your own question!
Here the hints in pseudocode:... if the product was bought within 7 days only x% of it is profit, more than 7 days ago y% of it is profit
Code: Select all
...
if TODAY - date_of_purchase <= 7 then
PROFIT = x
ELSE
PROFIT = y
end if
...
Best
Klaus