Hi,every one I am going to find whether the given number is a armstrong number or not and I have done my level best and I need your help in one thing,If any mistakes,please reply and I need your other views to develop my C skills.hope help from you all

thank you
vinaychalluru

google will give you a lot of help, such as this one.

hope this helps u gettin final code...

eg:..to find 3 digit armstrong number:

void main()
{
int a,b,c,i;

printf("enter a 3 digit number\n");
scanf("%d",&i);

a=(i-(i%100))/100;
b=((i%100)-(i%10))/10;
c=i%10;
num=(a*a*a)+(b*b*b)+(c*c*c);
if(num==i)
printf("\nthis is armstrong");
getch();
}

Hi,
I have a soln for solving armstrong numbers

#include<stdio.h>
#include<conio.h>
void main()
{
 int i,j,n,r,c,k;
 clrscr();
 printf("Armstrong numbers\n");
 for(i=1;i<=500;i++)
{
 c=0;
 n=i;
 k=n;
 while(n!=0)
 {
    r=n%10;
    c=c+(r*r*r);
    n=n/10;
}
if(c==k)
printf("%d\n",k);
}
getch();
}

>hope this helps u gettin final code...
>I have a soln for solving armstrong numbers
I take solace in the fact that people who give away homework solutions usually come from the shallow end of the programmer pool. :icon_rolleyes:

Hi nitishssingh. I read the PM you sent me, and no, I won't help you cheat your way through school.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.