write a java program to check whether the product of two numbers is a buzz no. or not.
Answers
Answered by
6
import java.io.*;
class Buzz
{
public static void main (String ar[]) throws IOException
{
int n,i;
BufferedReader br= new BufferedReader(new InputStreamReader(System.in);
System.out.println("enter a number");
n=Integer.parseInt(br.readLine());
for(i=1;i<=n;i++)
{
if (i%7==0|| i%n==7)
System.out.println(i);
}
}
}
class Buzz
{
public static void main (String ar[]) throws IOException
{
int n,i;
BufferedReader br= new BufferedReader(new InputStreamReader(System.in);
System.out.println("enter a number");
n=Integer.parseInt(br.readLine());
for(i=1;i<=n;i++)
{
if (i%7==0|| i%n==7)
System.out.println(i);
}
}
}
Answered by
3
The program is given in the picture attached with my answer. The program free from any kinds of error.
Buzz number is a type of number which is either divisible by 7 or end with 7.
Attachments:
Similar questions
Psychology,
8 months ago
Math,
8 months ago
Social Sciences,
1 year ago
Science,
1 year ago
Social Sciences,
1 year ago
History,
1 year ago