+ n 2 ). Method 1: Using while loop. The example below shows how to use while loop to calculate sum of squares of first n natural numbers.
確定! 回上一頁