write a program to take a number and check if it is a buzz number using buffer reader and if else statement
Answers
Answered by
2
import java.io.*;
public class Buzz {
public static void main(String[] args) throws IOException {
InputStreamReader read = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(read);
int num;
System.out.println("Enter a number : ");
num = Integer.parseInt(br.readLine());
if(num % 10 == 7 || num % 7 == 0)
System.out.println("Buzz Number");
else
System.out.println("Not buzz Number");
}
}
Similar questions