Accept a number and check if it is a bus number or not
Answers
Answered by
2
Answer:
A number is said to be buzz number if it is divisible by 7 or has 7 as a digit in its unit place.
Explanation:
import java . util . Scanner;
class Buzz
{
public static void main( )
{
Scanner ob = new Scanner (System.in);
System.out.println("entre a number");
int n = 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.");
}
}
}
HOPE IT'S HELPFUL.....................
PLZZ MARK AS BRAINLIST.....................
Similar questions