Creat a program to chack where a number is buzz number or not
Answers
Answered by
1
import java. util. *
class Buzz
{
public static void main (string args[])
{
Scanner sc= new Scanner (System. in);
int x;
System.out.println ("Enter a number");
x=sc. nextInt ();
if(x%==0||x/10==7)
System.out.println (x+"is Buzz number");
else
System.out.println (x+"is not Buzz");
}
}
A Buzz number is a number which is divisible by 7 or whose last digit is 7.
Similar questions