have to design a javascript program to capture five different numbers (monetary values), and save it in memory. Then another one that converts that value to, let's say, Euros, and display interest and commisions (which are values I'll have to add later, but the actual coding for the calculation is what's confusing to me. Let's just say, take 10% out of the initial value for interest, and 15% for commission). I would appreciate any help
What do you think you need to do first? Here's a couple question to ask yourself about his problem. Do I need user input? How can I store it after that? How can I display it? Small questions like these when programming gives you good practice to start of with. Then you can slowly migrate other features to it.
Hope this gives you a good start even though there is no code.
I know how to ask for those first 5 values and store them, what I'm having trouble with is the second part, where I have to not only take out some percentages from the initial value (that's the easy part), but ALSO convert it to another monetary value which the user has to choose.
That's what I'm not really clear on how to do. I can definitely make it so that it converts it automatically to Yen, for example, but I don't know how to give the user the choice of what type of monetary value to convert it to.
Seems like you'll want some kind of dropdown box or a set of radio buttons on your input form, with a list of the available currencies. You can use the element's value property to figure out what currency the user selected. Calculate your answer in some base currency like Yen, then use the exchange rate between Yen and your desired currency.
I'm making an assumption in that last part: that converting to Yen and then to your desired currency yields the same result as a direct conversion. You'll need to confirm that to use this technique...
Seems like you'll want some kind of dropdown box or a set of radio buttons on your input form, with a list of the available currencies. You can use the element's value property to figure out what currency the user selected. Calculate your answer in some base currency like Yen, then use the exchange rate between Yen and your desired currency.
I'm making an assumption in that last part: that converting to Yen and then to your desired currency yields the same result as a direct conversion. You'll need to confirm that to use this technique...
Yeah I'm pretty sure that's exactly what should work. The only confusing part for me is how to actually write the code for it.
Bookmarks