Masterful Important Number programs ICSE part-3
For more programs https://wordpress-343193-1101484.cloudwaysapps.com/string-programs-part-iiiicse-computer-applications
For more programs
Astonishing Java String Programs part-III
Number programs:
Buzz Number: It is a number that is divisible by 7 or it's last digit is 7.(For example 49 is divisible by 7 so it is a buzz number, 27 has 7 as it's last digit so it is also a buzz number)
import java. io.*;
class buzz_num
{
public static void main()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Give a number");
int num=Integer.parseInt(br.readLine());
int rem;
rem=num%10;
{
if(rem==7 || num%7==0)
System.out.println("This is a buzz number");
else
System.out.println("This is not a buzz number");
}
}
}
I/p:- 47
O/p:-This is a buzz number.
I/p:- 22
O/p:- This is not a buzz number.
2. Another number programs is Armstrong number:-It is a number whose digits cubes sum is equal to the number(for example 153--> (1)3+(5)3+(3)3=1+125+27=153, so it is an Armstrong number)
import java.io.*;
class armstrong
{
public static void main()throws IOException
{
BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
System.out.println("Give a number");
int num=Integer.parseInt(br.readLine());
double rem;
int n=num;
int sum=0;
do
{
rem=num%10;
rem=(Math.pow(rem,3));
sum+=rem;
num=num/10;
}while(num!=0);
if(sum==n)
System.out.println("This is an Armstrong number");
else
System.out.println("This is not an Armstrong number");
}
}

Click here For videos related to java programming
http://www.youtube.com/user/trushnatej
Related Posts
Continue learning with these related articles

User-Defined Methods in Java for ICSE Class 10: Parameters, Return and Overloading
ICSE Class 10 Computer Applications notes on user-defined methods: method prototype and signature, formal and actual parameters, return types, call by value vs call by reference, pure and impure methods, static methods and method overloading, with programs.

String Methods in Java for ICSE Class 10: 25 Output Questions with Answers
ICSE Class 10 Computer Applications practice on String class methods: length, charAt, indexOf, lastIndexOf, substring, replace, trim, compareTo, equals and more, with 25 board-style output questions and step-by-step answers.

Special Number Programs in Java for ICSE: Armstrong, Spy, Neon, Disarium, Pronic and More
Every special number asked in ICSE Computer Applications – prime, perfect, Armstrong, palindrome, automorphic, neon, spy, Niven, duck, buzz, Disarium, special and pronic numbers – with definitions, examples and one complete Java program that checks them all.