Computer Science, asked by diyagupta4561, 5 months ago

Q5. i) Write a program to input a number and to check number if BUZZ number
Or not.(A buzz number is divisible by 7 and end(last digit) with 7).
[7.5]
HTI

Answers

Answered by TheUntrustworthy
10

import java. util. *

class Buzz

{

public static void main (string args[])

{

Scanner sc= new Scanner (System. in);

int x;

System.out.println ("Enter a number");

x=sc. nextInt ();

if(x%==0||x/10==7)

System.out.println (x+"is Buzz number");

else

System.out.println (x+"is not Buzz");

}

}

A Buzz number is a number which is divisible by 7 or whose last digit is 7.

Similar questions