Buzz Number.
Program to check whether a given number is Buzz or not.
A number is said to be Buzz number if it ends with 7 or is divisible by 7.
Example 1007 is a Buzz number as it end with 7. Similarly, 49 is also a Buzz number as it is divisible by 7.
SOURCE CODE
import java.io.*;
public class Buzz_Number
{
public static void main(String args[])throws IOException
{
BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
System.out.print("Enter a number :");
int a=Integer.parseInt(br.readLine());
if(a%10==7||a%7==0)
System.out.println("Yes,It is a Buzz No.");
else
System.out.println("No,It is not a Buzz No.");
}
}
OUTPUT
Click Here to download program
If you have any question then leave a comment below I will do my best to answer that question.



Comments
Post a Comment