function sumOfSquares() {
let sum = 0;
for (let i = 1; i <= 7; i++) {
let num = parseFloat(prompt(`Введіть число №${i}:`));
let square = num * num;
if (Math.abs(num) > 3) {
sum += square;
}
return sum;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
function sumOfSquares() {
let sum = 0;
for (let i = 1; i <= 7; i++) {
let num = parseFloat(prompt(`Введіть число №${i}:`));
let square = num * num;
if (Math.abs(num) > 3) {
sum += square;
}
}
return sum;
}