Exercise 4 Program Counts Adds Sum First 99 Positives Integers Public Class Mystery Public Q37196667

Exercise #4: This program counts and adds up the sum of the first 99 positives integers. public class Mystery public static vExercise #4: This program counts and adds up the sum of the first 99 positives integers. public class Mystery public static void main (String[1 args) line1 int counter, sum; declare loop counter and sum initialize the loop counter initialize the sum 4 iterate the loop 99 times counter = 1; // line 2 sum0 / 1ine 3 while counter <100) // line sum = sum + counter; line 5 add value of counter to the sum

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.