+ 3
I can't do this exercise please help me
The first two lines of the given code take two numbers as input. Task Complete the code to output whether or not the numbers are equal (true or false). Sample Input 11 11 Sample Output true Remember that all comparison operators always return true or false. For example: console.log(11==11) outputs true. exercice: var num1 = parseInt(readLine(), 10); var num2 = parseInt(readLine(), 10); //your code goes here
15 Respostas
+ 2
I succeeded thank you very much I saw too complicated when it was so simple the code was simply:
var num1 = parseInt(readLine(), 10);
var num2 = parseInt(readLine(), 10);
//your code goes here
console.log(num1==num2)
Thank you Lisa and Solomoni Railoa !
+ 3
Please read the task description again: in the bottom they give an example
+ 2
Florian Great you solved!
+ 2
Welldone you did it i was counting on you
+ 1
Compare num1 and num2 for equality and output it
+ 1
Do not remove the given code and do not hard code the input values!
num1 and num2 are the input values, compare the variables num1 and num2 for equality.
Also look at the example from the task description: you don't need an if-else statement
0
Google the if statement that might be helpful
0
I modified by putting the whole statement
and yes i have to use console.log () for the right output
0
I tried what
Solomoni Raiola advised me but it didn't work
var a = 3+3; //change this to input like above
var b = 4+2; //with parseInt(readLine(),10);
if (a==b) {
console.log("true")
}
else{
console.log("false")
}
Test Case 1
Input
12
13
Your Output
true
Expected Output
false
(all other test cases are good)
0
Hi
- 1
Hi