0
HELP
You are making a currency converter app. Create a function called convert, which takes two parameters: the amount to convert, and the rate, and returns the resulting amount. The code to take the parameters as input and call the function is already present in the Playground. Create the function to make the code work. Sample Input: 100 1.1 Sample Output: 110 function main() { var amount = parseFloat(readLine(), 10); var rate = parseFloat(readLine(), 10); console.log(convert(amount, rate)); }
5 Antworten
0
function convert(amount, rate) {
return amount * rate;
}
+ 1
Кандыбаев Алишер please describe your question :)
+ 1
you must define a function 'convert', not a variable... or at least just output 'convert' variable value ;)
+ 1
Tomás Corrales Lemoine you didn't help OP by giving the answer: he must apply its learn to acquire skill ;)
sometimes we could give corrected code, but sometimes we should just give hints, all the more when the hints are really close to the answer...
0
Ok