Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
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 Respostas
+ 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.