Rewrite the following code using while loop.
final int N = 15;
for(int i=0, sum =0; i
sum += i;
System.out.println("Sum = "+sum);
Answers
Answered by
5
Answer:
final int N=15;
int i=0;
int sum=0;
Sum+=i;
while (sum<=N)
System.out.println("Sum =" +sum);
i++;
Similar questions
Computer Science,
3 months ago
English,
3 months ago
English,
6 months ago
Economy,
11 months ago
English,
11 months ago