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]

Java

Java Conditional Stmts

72 Likes

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");
    }
}

Output

Answered By

29 Likes


Related Questions