Saved Bookmarks
| 1. |
Write java program to find whether a number is buzz number with ternory operator |
|
Answer» 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: |
|