BUZZ numbers
Buzz numbers are the numbers when we divide the number with 7 the number should totally divisible with 7 or the reminder should come 7 of the number when we divide it with 7
example :-49,56
import java.io.*;
class buzz
{
public static void main(String args[]) throws IOException
{
example :-49,56
import java.io.*;
class buzz
{
public static void main(String args[]) throws IOException
{
int n;
DataInputStream in=new DataInputStream(System.in);
System.out.print("Enter a no");
n=Integer.parseInt(in.readLine());
if(n%10==7||n%7==0)
System.out.println("buzz");
else
System.out.println("not");
}
}
System.out.println("buzz");
else
System.out.println("not");
}
}
This comment has been removed by the author.
ReplyDelete