+ 6
Hi, Why 1.2practice(JavaSc) is not marked
with green tick as successfull? It's named "Big Sale"? There are 3 test cases. If one of them becomes green tick the others become ×(wrong). So they three must have been with green tick simolteneously (at the same time) may be. Could You tell me please step by step what I have to do? https://code.sololearn.com/W6lOlY08Gtp7/?ref=app
12 ответов
+ 7
The problem is solved!!! ☺️Special Thanks to You, RKK
+ 5
This is a practice from SOLOLEARN PRO Java Script.
+ 5
No. If I asign different value s to var oldPrice this code has been correct becomes wrong and that code has been wrong becomes correct.
BUT all the three tests never are correct.
+ 5
150 and 1500
+ 5
Yes, but then input value 100 becomes wrong output. May be "try again" button and save I'm doing something wrong.
+ 2
it's working fine.
is this a challenge for us?
+ 2
okay did it passed all the test cases?
+ 2
okay i see for which input value its showing wrong output.
+ 2
Good to know, and congrats! 👏🎉😁
+ 1
Your code is perfect it's giving me
120 for 150
and
1200 for 1500
which is correct.
+ 1
EGO use this line
var oldPrice = parseInt(readLine(), 10);
instead of
var oldPrice = 100;
And try running again.
0
EGO
copy and paste this code once...
function main() {
var oldPrice = parseInt(readLine(), 10);
// your code goes here
var z = oldPrice-oldPrice*(20/100);
console.log(z);
}