Looking for a Tutor Near You?

Post Learning Requirement »
x

Choose Country Code

x

Direction

x

Ask a Question

x

x
x
x
Hire a Tutor

Java Programs For Class 9 And 10

Loading...

Published in: Java And J2EE
2,126 Views

Important for exam

Jayeeta B / Kolkata

3 years of teaching experience

Qualification: MCA

Teaches: All Subjects, Computer, Computer Science, School Level Computer

Contact this Tutor
  1. Create a class named armstrong and write a program(source code) in JAVA to accept a number.Check and print whether the number is Armstrong or not. class armstrong{ public void display(int n) int nl=n; int s=0; while(n>0) int a=n%10; n=n/10; s=s+(a*a*a); if(s==nl) System.out.println("lt is an Armstrong number"); else System.out.println("lt is not an Armstrong number"); OUTPUT It is an Armstrong number