Write a program in java to input a number and check the number whether it is a buzz no or not with variable description
Answers
Answered by
2
Answer:
public class display
{
public static void main(String args[ ])
{
int n;
if(n%10==7lln/7==0)
{
system. out. println("buzz number");
}
else
{
system.out.println("not a buzz number")
}
}
}
Answered by
56
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");
}
}
Similar questions