In the code given below to calculate the sum of squares of first 10 natural numbers, find the output. Why the output is so? If the output is not correct then mark the error and write correct code.
The while loop given in the code is an infinite loop ie., the loop will not terminate.
The error is in the update expression ie., n=n+1 or in the test expression ie., while(n>0).