Math, asked by anindyaadhikari13, 4 months ago

Java code to find sum of 100 positive integers using 1 variable. ​

Answers

Answered by subhransusahoo94
3

Answer:

Using Java while Loop

public class SumOfNaturalNumber2.

{

public static void main(String[] args)

{

int num = 100, i = 1, sum = 0;

//executes until the condition returns true.

while(i <= num)

{

Answered by BADBOY00007
1

Answer:

int num = 100, i = 1, sum = 0;

Step-by-step explanation:

try it

hope its right

have a good day :)

Similar questions