1
Reply

pls help me the following question

terrykhaw

terrykhaw

Jan 4 2005 1:14 AM
1.8k
Q4. This is a lot trickier - try to design a different algorithm to do the same job as the one for Question 4. (Note: thinking of alternative approaches can be very difficult, as we tend to have our minds set on a single path. So this could prove to be challenging. Or not, of course). (20%) Q5. Take the following algorithm: 1. Get the price from the user and record it. 2. Get the currency from the user. 3. Get the current conversion rate from the database. 4. Convert the price to the new currency. 5. Report the results. What does this algorithm do? Refine it so that it takes into account the golden rule of computer programming - never trust the users. You can either use a fixed number of currencies, or you can assume that the database will return "null" if a currency doesn't exist. (15%) (IN algorithm only )no variable, no pseudocode

Answers (1)