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(); }
Showing posts with label armstrong series. Show all posts
Showing posts with label armstrong series. Show all posts
Sunday, November 20, 2011
C Program to Find Armstrong Series
Labels:
armstrong,
armstrong series,
c example,
c program,
sample example
Subscribe to:
Posts (Atom)
Popular Posts
- How to Format a Date in JavaScript
- PL/SQL program to generate Fibonacci series
- C Program to Generate Analog Clock Using Graphics
- Java Function Code to create Reverse Linked List of Singly Linked List (In memory pointer changes)
- C Program For Floyd's Triangle
- What is Dofollow and Nofollow Links?
- PL/SQL Example to find average of three numbers
- C Program For Fibonacci Series
- Basic LOOP Program in PL/SQL
- C program to find the sum of two matrix