let n=20;
function findSum(n)
{
let sum = 0;
for (let x = 1; x <= n; x++)
sum = sum + x;
return sum;
}
console.log(findSum(n));
let n=20;
function findSum(n)
{
let sum = 0;
for (let x = 1; x <= n; x++)
sum = sum + x;
return sum;
}
console.log(findSum(n));
This website uses cookies.