Slide 1Solve problems with Java code Algorithms with Java Slide 2 Sum 1..N – Example Calculate and print the sum of the first N positive numbers Calculate and print the…