0

I am stuck how to Print 15 next leap years and return it using array in java ??

https://code.sololearn.com/cRH5oNb2Y9co/?ref=app

30th Jan 2021, 4:35 AM
Praveen Kumar
Praveen Kumar - avatar
8 Answers
+ 2
just write n++ inside if statement increment only if year % 4 == 0
30th Jan 2021, 4:57 AM
durian
durian - avatar
+ 1
Thank You so much its done
30th Jan 2021, 4:59 AM
Praveen Kumar
Praveen Kumar - avatar
+ 1
Sorry Praveen Kumar I was unable to help you
30th Jan 2021, 5:01 AM
Atul [Inactive]
0
Just change 15 to 57
30th Jan 2021, 4:51 AM
Atul [Inactive]
0
No but i want to print like 2000 2004 2008 continuous
30th Jan 2021, 4:53 AM
Praveen Kumar
Praveen Kumar - avatar
30th Jan 2021, 4:53 AM
Atul [Inactive]
0
No bro output i want is :- 2000 2004 2008 2012 ...till 15 continous leap years ...no 0 In between
30th Jan 2021, 4:54 AM
Praveen Kumar
Praveen Kumar - avatar
0
No bro no problem
30th Jan 2021, 5:02 AM
Praveen Kumar
Praveen Kumar - avatar