Computer Science, asked by somalikabhowmik1984, 4 days ago

enter number. print sum until it is greater than 150 using for loop in java​

Answers

Answered by mokshjoshi
0

Answer:

Getting the sum using a for loop implies that you should:

Create an array of numbers, in the example int values.

Create a for statement, with an int variable from 0 up to the length of the array, incremented by one each time in the loop.

In the for statement add each of the array's elements to an int sum.

Similar questions