Buzz number program in java

A number is said to be Buzz Number if it ends with 7 or is divisible by 7.

Example: 17 is a buzz number as it ends with 7,

14 is a buzz number as it is divisible by 7

77 as it ends with 7 and also divisible by 7

Program:

import java.util.*;
public class BuzzNumber
{
public static void main(String args[])
{
Scanner ob=new Scanner(System.in);
System.out.println(“Enter the number”);
int num=ob.nextInt();
if(num%10==7 || num%7==0)// 17 , 14 ,77
{
System.out.println(num+” is a Buzz Number”);
}
else
{
System.out.println(num+” is not a Buzz Number”);
}
}
}

Other important posts links ::