@shooter4000authorFeb 20.2007 — #Ive attempted part (i) and (ii) of question 1 , Question 1(iii) wants you to incorporate and extend the program to execpt another 2 types of currencies usings arrays and algarithms. Ive read all the material in book 8 and completed all the exercises but still dont know where to start i'm useless at this.
heres my code:
<HTML>
<HEAD>M 150 TMAO3 Question 1
<TITLE>Enter a currency</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
var currencyType
currencyType = 0;
var amountEntered;
amountEntered = 0;
var amountConverted;
amountConverted = 0;
currencyType = window.prompt('Please enter the currency 0) Dollar 1) Euro 2)gbp 3)yen','');
currencyType = parseFloat(currencyType);
while (currencyType > 1 || currencyType < 0)
{
currencyType = window.prompt('Please re-enter currency should be 0 or 1','');
currencyType = parseFloat(currencyType);
}
amountEntered = window.prompt('Please enter the amount to be converted','');