Computer Science, asked by hardeepkaur0903, 4 days ago


. Check whether it is a Buza number or not. A number is said to be Buzz if it ends with 7 or is divisible by 7. Eg: 1007 is buzz, as it ends with 7. Also, 343 is buzz as it is divisible by 7. INR​

Answers

Answered by ItzMeSam35
2

import java.util.Scanner;

public class BuzzNumber

{

public static void main (String args[])

{

Scanner input = new Scanner(System.in);

System.out.print("Enter a number : ");

int num = input.nextInt();

if ((num % 10 == 7) || (num % 7 == 0))

System.out.println(num+" is a buzz number");

else

System.out.println(num+" is not a buzz number");

input.close();

}

}

Similar questions