Write a program that displays all the numbers from 100 to 10
Write a program that displays all the numbers from 100 to 1,000, ten per line, that are divisible by 5 and 6. Numbers are separated by exactly one space.
Solution
public class divisibleBy {
public static void main(String args[])
{
for(int i=120,j=0;i<1000;i+=30,j++)
{
if(j%10==0 && j!=0)
{
System.out.println(\"\");
}
System.out.print(i+\" \");
}
}
}
