•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 456,562 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,507 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 1914 | Replies: 6
![]() |
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,541
Reputation:
Rep Power: 40
Solved Threads: 972
google will give you a lot of help, such as this one.
•
•
Join Date: Nov 2007
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
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();
}
•
•
Join Date: Nov 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
I have a soln for solving armstrong numbers
I have a soln for solving armstrong numbers
c Syntax (Toggle Plain Text)
#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(); }
Last edited by stymiee : Nov 8th, 2007 at 11:16 am. Reason: please use code tags
![]() |
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Random number generator's (C++)
- help me for genrating program for Armstrong no (C++)
- Armstrong number generator (Community Introductions)
- Armstrong numbers (C)
- Help!!!!!! General Protection Exception (C++)
Other Threads in the C Forum
- Previous Thread: How......
- Next Thread: srand function



Linear Mode