Skip to main content

Posts

Showing posts with the label Project Euler problem 6 to 10 solution
Project Euler Problem 6,7,8,9,10  in Java 6) Problem 6- Project Euler Solution in Java Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640. Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum. My approach to the problem: public class squareDifference {    /*      * @euler project 6      * @author Niraj pate l      * /     public static void main(String[] args) {         int sum=0,sumSquare=0;         for(int num =1;num<101;num++){             sum+=num;             sumSquare+=num*num;         }         System.out.println(sum*sum - sumS...