0

currency converter app

ماالخطأ في كودي؟ function convert (amount ,rate ) { return amount * rate ; } function main () { var amount = patsefloat (readline (), 10 ); var rate = patsefloat (readline (), 10 ); console.log(convert (amount ,rate )); }

26th Jan 2022, 6:33 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
5 Answers
+ 3
👉Please do not put the description in the heading – IT GETS CUT OFF 👉TAG THE RELEVANT PROGRAMMING LANGUAGE 👉show YOUR CODE please
26th Jan 2022, 6:35 PM
Lisa
Lisa - avatar
+ 2
You have a typo: It's parseFloat()
26th Jan 2022, 6:51 PM
Lisa
Lisa - avatar
+ 1
مازال الخطأ
27th Jan 2022, 8:58 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
function convert (amount ,rate ) { return amount * rate ; } function main () { var amount = patsefloat (readline (), 10 ); var rate = patsefloat (readline (), 10 ); console.log(convert (amount ,rate )); }
26th Jan 2022, 6:41 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
هذا السؤال 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.
26th Jan 2022, 6:43 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar