Answer:
Replace the comment
//Write your code here
with
for(int i =5; i<=500;i++){
System.out.print(i+" ");
if(i%50 == 0){
System.out.println();
}
}
Explanation:
See attached for the full program
This line iterates from 5 to 500
for(int i =5; i<=500;i++){
This prints each digit
System.out.print(i+" ");
The following if condition checks if current digit is a multiple of 5; if yes, a line is printed
if(i%50 == 0){
System.out.println();
}
}