Computer Science, asked by anshulsahai659, 11 months ago

write java program to find whether a number is buzz number with ternory operator

Answers

Answered by JAYADADI
1

Answer:

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

       }

   }

}

please mark me as brain list please

Explanation:

Answered by divyansh05887
1

Answer:

HOPE IT WILL HELP YOU..

Attachments:
Similar questions