write a java program that prints Armstrong number using recursion.
please send answer fast..it's urgent
Share
write a java program that prints Armstrong number using recursion.
please send answer fast..it's urgent
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
1. int x; int findArmstrong(int n,int a) { if(n!=0)
2. { x=n%10; a=a+(x*x*x); n/=10 ;
3. return findArmstrong(n,a); } return a; }
4. public static void main(String[] arg) { ArmstrongRecursion A=new ArmstrongRecursion(); int arm;
5. System. out. println("Armstrong numbers between 1 to 1000"); ...
6. if(arm==num) System. out.