write a java program to display all buzz no. of 3 digit .
Answers
Answered by
2
Question:-
Write a java program to display all the buzz number of 3 digits.
Program:-
A number is said to be a buzz number if the last digit of the number is 7 or the number is divisible by 7.
So, here is the program.
class Buzz
{
public static void main(String args[])
{
for(int i=100;i<1000;i++)
{
if(i%7==0 || i%10==7)
System.out.print(i+" ");
}
}
}
Similar questions