Java program that uses a loop to compute the sum of all squares between 1 and 100 (inclusive)
###### Posted by Samath
Last Updated: April 03, 2022

Write a Java program that uses a loop to compute the sum of all squares between 1 and 100 (inclusive).

Code:

```import java.util.Scanner;

public class Main
{
public static void main(String[] args) {

double total = 0;
for (int i = 1; i < 101; i++) {
total += i * i;
}
System.out.println("Result: " + total);
}
}
```
###### Java program that uses a loop to compute the sum of all even numbers between 2 and 100 (inclusive)
Samath | Apr 03, 2022
###### Java program that uses a loop to compute the sum of all even numbers between a and b (inclusive), where a and b are inputs
Samath | Apr 03, 2022
###### Java program that uses a loop to compute the sum of all odd digits of an input. (For example, if the input is 32677, the sum would be 3 + 7 + 7 = 17.)
Samath | Apr 03, 2022
###### Sum of the first 30 squares in C
Samath | Dec 21, 2014
###### C Program to Compute sum of the array elements using pointers
Samath | Jan 02, 2017
###### Sum of two values in C
Samath | Nov 09, 2014
###### C Program to find sum of two numbers
Samath | Jan 02, 2017
###### C++ Calculate the sum from 1 to 100
Samath | Jan 05, 2017
###### Find factorial using loop in C++
Samath | Nov 02, 2014
###### C Program that Print First 10 Natural Numbers using For, While and Do-While Loop
Samath | Jan 02, 2017
###### Javascript program that check if a word is palindrome using one for loop
SceDev | Feb 17, 2024
###### Write a C++ program that find the sum of all even numbers between 1 and 30 excluding 6, 8, 24 and 28
Samath | Nov 02, 2014
###### Java program that compute the average test score for a student and assign the appropriate letter grade
Samath | Jan 17, 2024
###### Recursive function that find the sum of digits in a integer using C++
Samath | Dec 24, 2014