PSEUDOCODE HELP

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mgorg199
Posts: 1
Joined: Tue May 19, 2015 8:23 am

PSEUDOCODE HELP

Post by mgorg199 » Tue May 19, 2015 8:34 am

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!!!

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: PSEUDOCODE HELP

Post by Klaus » Tue May 19, 2015 1:02 pm

Hi mgorg199,

maybe you want to explain what this has to do with Livecode? 8)

In the meantime I can give you some hints, although you already answered your own question!
... if the product was bought within 7 days only x% of it is profit, more than 7 days ago y% of it is profit
Here the hints in pseudocode:

Code: Select all

...
if TODAY - date_of_purchase <= 7 then
   PROFIT = x
ELSE
  PROFIT = y
end if
...
And since this is not really OFF-TOPIC I will move the thread to the beginners section.


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”