

InterviewSolution
Saved Bookmarks
1. |
Write a program to print the sum of squares of all the numbers from 1 to 10 using a loop |
Answer» The GIVEN problem is solved USING language - Java. public class Brainly{ public static VOID main(String s[]){ int SUM=0,i; for(i=1;i<=10;i++) sum+=i*i; System.out.println("Sum of squares of numbers from 1 to 10 is: "+sum); } }
See the attachment for output. |
|