Question: Need this in java please While Loop Complete the following code in order to figure out how many terms is required in the sum 1+2+3+...

Need this in java please

While Loop

Complete the following code in order to figure out how many terms is required in the sum 1+2+3+... so that the sum exceeds an integer n. Store the result in an integer variable count. Assume that the initial value of the variable n is already set to a positive integer. E.g. 1: if the value of n is 3, the value of count will be 3. E.g. 2: if the value of n is 6, the value of count will be 4. E.g. 3: if the value of n is 10, the value of count will be 5.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!