Computer Science, asked by Anonymous, 1 year ago

a program on : input a no. and print if it is a buzz no.


Shridhar023: in which class you are?
Anonymous: 10
Shridhar023: oh
Shridhar023: im in 9
Anonymous: kkk..
Anonymous: actually m also in 9..i thout u were elder than me
Shridhar023: i knew it somewhere
Anonymous: in which schl????
Anonymous: i hv posted one question on fibonacci series ...plss answer dat
Shridhar023: yes im writing that

Answers

Answered by Shridhar023
3
NOTE : THE STATEMENT IN BOLD HAS TO BE WRITTEN IN ONE LINE ONLY.

import java.io.*;

class Buzz

{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int a;
public void show()throws Exception

{
System.out.println("Enter the number:"); a=Integer.parseInt(br.readLine());
if(a%10==7 || a%7==0)

System.out.println("Entered number is a Buzz number.");

else

System.out.println("Entered number is not a Buzz number.");

}
public static void main(String args[])throws Exception

{ 
Buzz ob=new Buzz();
 ob.show();
}

}

Shridhar023: Hope it helps ; plz mark as brainliest ....
Answered by Meww
0
Pseudo code: 

while (number > 99) number /= 10; 
if (number % 10) == 7 print("It's a buzz number);

Meww: click on the yellow button beside my answer
Similar questions