write a program to check whether a no. is buzz no. or not
Answers
Answered by
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");
}
}
}
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
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
Social Sciences,
7 months ago
Sociology,
7 months ago
Science,
7 months ago
English,
1 year ago
Social Sciences,
1 year ago
Science,
1 year ago
Math,
1 year ago