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 )); }
5 Réponses
+ 3
👉Please do not put the description in the heading – IT GETS CUT OFF
👉TAG THE RELEVANT PROGRAMMING LANGUAGE
👉show YOUR CODE please
+ 2
You have a typo: It's parseFloat()
+ 1
مازال الخطأ
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 ));
}
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.