/* Write a program to print the numbers from 1 to 10 and their squares. Write a program to compute the average of the ten numbers 1, 4, 9, ..., 81, 100, that is, the average of the squares of the numbers from 1 to 10. after square of each number is computed, add it in to a variable sum which keeps track of the sum of all the squares, and then at the end, divide the sum variable by the number of numbers summed.) */ for(int i=1;i<=10;i++) { System.out.println("The number is "+i+" and its square "+ (i*i)); } int avr=0; for(int i=1;i<=10) { avr+=(i*i); } avr=avr/10; System.out.println(avr);