write java program to find whether a number is buzz number
Answers
Answered by
132
A number is said to be a Buzz number if it is divisible by 7 or has 7 as a digit in its unit place...
Here is ur programming
import java.util.*;
public class BuzzNumberCheck
{
public static void main(String args[])
{
Scanner ob=new Scanner(System.in);
System.out.println("Enter the number to be checked.");
int num=ob.nextInt();
if(num%10==7 || num%7==0)
{
System.out.println(num+" is a Buzz Number.");
}
else
{
System.out.println(num+" is not a Buzz Number.");
}
}
}
Here is ur programming
import java.util.*;
public class BuzzNumberCheck
{
public static void main(String args[])
{
Scanner ob=new Scanner(System.in);
System.out.println("Enter the number to be checked.");
int num=ob.nextInt();
if(num%10==7 || num%7==0)
{
System.out.println(num+" is a Buzz Number.");
}
else
{
System.out.println(num+" is not a Buzz Number.");
}
}
}
Answered by
37
To check a number whether it is Buzz or not
Attachments:

Similar questions
Computer Science,
9 months ago
Science,
1 year ago
Biology,
1 year ago
Geography,
1 year ago
English,
1 year ago