Computer Science, asked by babysneh, 11 months ago

write a program to check whether a no. is buzz no. or not

Answers

Answered by AshStyles
9
Hey Mate..!!

Here's Your Answer..!!

import java.util.Scanner;
class Buzz
{
public static void main (string args [])
{
Scanner sc=new Scanner (System.in);
System.out.println("Enter an integer");
int n= sc.nextInt();
if(n%7==0 || n%10==7);
{
System.out.println(n+"is Buzz");
}
else
{
System.out.println(n+"is not Buzz");
}
}
}
Answered by Brenquoler
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