Write an if condition to check that the number "x" is a BUZZ number.
Answers
Answered by
0
Answer:
if(x%7==0||x%10==7)
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");
}
}
Similar questions
Physics,
3 months ago
Math,
3 months ago
Sociology,
3 months ago
Social Sciences,
7 months ago
English,
7 months ago
Computer Science,
11 months ago
Math,
11 months ago