+ 3
CHALLENGE:Write a code which outputs whether a given number is even or odd.
This challenge is mainly for those who know Javascript. Also, please provide the link so that I can comment.
6 ответов
+ 2
Here is the code
https://code.sololearn.com/WuSBDqX1jX3r/?ref=app
+ 1
https://code.sololearn.com/W4xKYj1oK80g/?ref=app I think it's the correct answer.
0
here it goes
let num = prompt('Enter the number:');
var check = num%2==0?1:0;
if(check) alert("Number is even");
else alert("Number is odd");
0
https://code.sololearn.com/cOu3zl3hGikU/?ref=app
My Java sollution
0
Another sollution, now using Python
https://code.sololearn.com/chyQLTzkY0SI/?ref=app