Sum first 20 integer value | Sololearn: Learn to code for FREE!
0

Sum first 20 integer value

Good evening How I make the total to appear at once, which is 210? (using do while loop) Or is it supposed to be like this? https://code.sololearn.com/c6qLilik5g4O/?ref=app

5th May 2020, 6:30 PM
Azza
3 Answers
+ 3
Put that system.out.println outside do while loop
5th May 2020, 6:33 PM
Abhay
Abhay - avatar
+ 1
Abhay Thanks , I wish you a happy day
5th May 2020, 7:10 PM
Azza
0
@Azza same to you ,ty
5th May 2020, 7:11 PM
Abhay
Abhay - avatar