Computer Science, asked by ratnesh12, 1 year ago

write java program to find whether a number is buzz number

Answers

Answered by Rishita1111
132
A number is said to be a Buzz number if it is divisible by 7 or has 7 as a digit in its unit place...
Here is ur programming

import java.util.*;

public class BuzzNumberCheck

{
public static void main(String args[])
    {

        Scanner ob=new Scanner(System.in);

        System.out.println("Enter the number to be checked.");

        int num=ob.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.");

        }

    }

}
Answered by butterflyqueen
37
To check a number whether it is Buzz or not
Attachments:
Similar questions