Computer Science, asked by opbolte58i98, 2 months ago

java program to print the square of first 10 natural number but if a square which is divisible by 2,3 and 4 stop here and then (1,4,9,16,25,26) using while loop​

Answers

Answered by anishkakamboj
0

Answer:

hey mate hope this will help you

Explanation:

Input : N = 4 Output : 30 12 + 22 + 32 + 42 = 1 + 4 + 9 + 16 = 30 Iput ... is to run a loop from 1 to n and for each i, 1 <= i <= n, find i2 to sum. ... Return the sum of square of first n natural numbers.

Similar questions