Computer Applications
Program to check whether the product of two numbers is a buzz number or not.
[A number that ends with 7 or is divisible by 7, is called a buzz number]
Answer
public class KboatBuzzCheck
{
public static void buzzNumCheck(int a, int b) {
int p = a * b;
System.out.println("Product = " + p);
if (p % 10 == 7 || p % 7 == 0)
System.out.println("Product is a Buzz Number");
else
System.out.println("Product is not a Buzz Number");
}
}