Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://zero.p2p.shpp.me/tasks/3_6_biggest_number.html
- let max = 0;
- while (true) { //
- let num = +prompt("Яке число? "); // запит числа
- if (num == 0) { // перевіряємо чи дорівнює нулю
- break;
- }
- if ((num % 2) == 0) { // перевірка,чи парне число
- if (max < num) {
- max = num;
- }
- }
- }
- console.log("The max is " + max);
Advertisement
Add Comment
Please, Sign In to add comment