0

What is wrong with the code until the result? False؟

function main() { var oldPrice = parseInt(readLine(), 10) // your code goes here  console.log(oldPrice*0.20);

23rd Jan 2022, 1:07 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
13 Antworten
+ 3
You need to remove the space between the double quotes and Java in your second code. \"Java is...
23rd Jan 2022, 3:21 PM
Simba
Simba - avatar
+ 2
Please do not put code in the heading – it gets CUT OFF and we can't see it. Rather put it in a script and link it. What are you trying to do with the code?
23rd Jan 2022, 1:12 PM
Lisa
Lisa - avatar
+ 2
You should multiply your oldPrice variable by 0.80 to get the final amount. 0.20 just gives the discount amount.
23rd Jan 2022, 1:47 PM
Simba
Simba - avatar
+ 1
Thank you
23rd Jan 2022, 2:30 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
Thanks, I modified it
23rd Jan 2022, 1:25 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
Please format it and describe what you want to do. } is missing
23rd Jan 2022, 1:28 PM
Lisa
Lisa - avatar
0
I want to solve a code in js course
23rd Jan 2022, 1:34 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
Please , Why is it giving me the wrong result in this code too?
23rd Jan 2022, 2:33 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
console.log('I\'m learning JavaScript'); console.log("A quote: \" Java is to JavaScript as ham is to hamster.\"");
23rd Jan 2022, 2:34 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
Thanks👍👍
23rd Jan 2022, 4:02 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
It also gives me an implementation error in the following code in solving the snail problem🥺
23rd Jan 2022, 4:04 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
function main() { var depth = parseInt(readLine(), 10); //your code goes here var i=1; while (i<depth) { var x=7; var y=2; var z=x-y; var s=z+(7-2); console.log(s) } }
23rd Jan 2022, 4:05 PM
Zina Shekh Alzoor
Zina Shekh Alzoor - avatar
0
Hi
25th Jan 2022, 10:00 AM
Deon Joby