Computer Science, asked by ishamoorkath6885, 11 months ago

Write a program to store a number in a variable and check whether it is a buzz number or not if the number is divisible by 7 or its last digit is 7

Answers

Answered by manishkr620520
0
Input : 63 Output : Buzz Number Explanation: 63 is divisible by 7, one of the condition is satisfied. Input : 72 Output : Not a Buzz Number Explanation: 72 % 7 != 0, 72 is neither divisible by 7 nor it ends with 7 so it is not a Buzz Number.
Answered by sahibgill13
1
buzz number program in java :-
import java.util.*;
class abc
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter the Number");
int n=sc.nextInt();
if(n%7==0 || n%10==7)
System.out.println("BUZZ NUMBER");
else
System.out.println("NOT BUZZ NUMBER");
}
}



HOPE IT HELPS
PLEASE MARK MY ANSWER AS BRAINLIEST
Similar questions