Code is copied!
Program To Print Buzz Number JAVA
Write a Program to print whether the inputted number is Buzz or not.
[Buzz numbers are those numbers that are divisible by seven or end with seven. For example, 57 is a buzz number]
import java.util.*; class BuzzNumber { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter the number"); int n = sc.nextInt(); if (n % 10 == 7 || n % 7 == 0) { System.out.println("Buzz number"); } else { System.out.println("Not Buzz number"); } } }