Computer Science, asked by venissa, 1 year ago

input a no. and print the no. if it is a buzz no.

Answers

Answered by prakriti27
0
(buzz number means the number should completely divisible by 7.....)
import java.io.*;
class Buzz
{
void main() throws IOExecepetion
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int a;
System.out.println("Enter the number:");
a=Integer.parseInt(br.readLine());
if(a%10==7 || a%7==0)
{
System.out.println("Entered number is a Buzz number.");
}
else
{
System.out.println("Entered number is not a Buzz number.");
}
}
}

prakriti27: mark it as the best
Similar questions