It is a sample c program to generate Armstrong number series from 1 to 1000.OutputProgram Source Code
//C Program to Find All Armstrong Number between 1 to 1000. #include"stdio.h" #include"conio.h" void main() { int no,r,sum=0,i; clrscr(); printf("\n\n***The Armstrong No. Series Between 1 and 1000 are:*** "); for(i=1;i<=1000;i++) { sum=0; no=i; while(no!=0) { r=no%10; no=no/10; sum=sum+(r*r*r); } if(sum==i) printf("\n%d",i); } getch(); }
Sunday, November 20, 2011
C Program to Find Armstrong Series
Labels:
armstrong,
armstrong series,
c example,
c program,
sample example
Popular Posts
- Generate Prime Number Series in Java Programming
- Java Function Code to create Reverse Linked List of Singly Linked List (In memory pointer changes)
- C Program to Print Patterns of Numbers
- Exception Handling Program in Java - How to Handle Exception in Java
- Reverse a Number in PL/SQL Programming
- C Program For Pascal's Triangle - Pattern Pascal's Triangle in C Programming
- Factorial Program in Java Using Class
- Exception Handling Program in PL/SQL Oracle
- Difference Between White Box And Black Box Framework
- Java File Handling Program - How to Handle File in Java
1 comment:
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371
Post a Comment
Dont SPAM