+ 1

Display the count of Armstrong number using arrays

can anybody help me solve this

28th Jul 2016, 2:49 AM
keerthana
7 ответов
+ 1
Hi Keerthana I published rigth now two programs: - Armstonmg Numbers Until 100K - Armstonmg Numbers Try to adapt your array or explain how do you need and ask for help. I hope it helps. Ricardo
28th Jul 2016, 5:48 AM
Ricardo Pucca
Ricardo Pucca - avatar
+ 1
Hi Keerthana, sorry, what means "ans pls ans" abbreviation?
28th Jul 2016, 1:11 PM
Ricardo Pucca
Ricardo Pucca - avatar
+ 1
I want the answer of this question in this section itself
28th Jul 2016, 2:09 PM
keerthana
+ 1
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; //Test with 153, 371, 1634, 54748 namespace SoloLearn { class Program { static void Main(string[] args){ Console.WriteLine("An Armstrong number is an n-digit number that is equal to the sum of the nth powers of its digits.\n"); int num=153,rem=0,temp,numL; double sum=0; while (num<=100000){ numL = Convert.ToString(num).Length; temp = num; while (temp != 0) { rem = temp % 10; sum += Math.Pow(rem,numL); temp /= 10; } if (num == sum) { Console.WriteLine("{0} is a Armstrong Number", num); } ++num; sum = 0; } } } }
28th Jul 2016, 2:12 PM
Ricardo Pucca
Ricardo Pucca - avatar
+ 1
Ok Keerthana. The programs are published in the "code playground" area, I will be glad if you get a like there!
28th Jul 2016, 4:27 PM
Ricardo Pucca
Ricardo Pucca - avatar
0
I M not getting the ans pls ans me
28th Jul 2016, 7:32 AM
keerthana
0
Thank u very much bro
28th Jul 2016, 4:10 PM
keerthana