Chandra is fond of mathematical operations using cubes and products. Since she
loves calculating hard values, her teacher gave her a task to find out the product of
the cubes of the first N natural numbers. To do that, Chandra first wanted to know
the trailing Os the resultant value for making calculations easier. Help her by writing
a code to do the same.
Input format
Answers
Answered by
4
Answer:
Answered by
0
Answer:
The product of the first N natural numbers' cubes is ².
Explanation:
start
Input: n
product = 1
for i=1 to n
product = product*i
i = i + 1
end for loop
print product
end
using WHILE loop
start
Input: n
product = 1
i=1
while(i<=n)
product = product*i
i = i + 1
end while loop
print product
end
#SPJ2
Similar questions