Você está na página 1de 5

STUDENTS 3K

HOME

STUDENTS+

FRESHERS

STUDY RESOURCES

MORE >>

You are here: Home / Important Programs / C program to nd Number is Armstrong or not

C program to find Number is Armstrong or not


C program to nd Number is Armstrong or not. It is a simple source code that provides the output of an actual
Armstrong number. Take care of a questions for your interviews or students exam. This is a totally free of cost
code.

Summer Law
Programs
Bucerius Law School
Summer Courses Visit
Germany's best Law Faculty!
law-school.de

Fibonacci series upto n numbers in C

FIND NUMBER IS ARMSTRONG OR NOT IN C


Find the given number is Armstrong or not program in C used to detect the input number is Armstrong or not by
calculating and sum the individual cube value of each number. If it is same to the given number then it will display
an output. For example, the given number is 153(13+53+33=153) then it will be an Armstrong number.
[Read: Career Guidance for all] & [Aptitude Q&A free download]
C CODE:
Q: Write a C program to check whether a given input value is Armstrong number or not.
01
02
03
04
05
06
07
08
09
10
11
12
13
14

//Headerfiles
#include<stdio.h>
#include<conio.h>
#include<math.h>

voidmain()
{
//Programvariables
intnumber,temp,number1,sum=0;
clrscr();//Functiontoclearpreviousoutput

printf("Enternumber:");//Displayfunction
scanf("%d",&number);//Gettinginputfunction
temp=number;

15

15
16
17
18
19
20
21
22
23
24
25
26
27

//checknumberisArmstrongarenot
while(number>0)//Unconditionalstatement
{
number1=number%10;
sum+=pow(number1,3);
HOME
STUDENTS+
number/=10;
}
if(sum==temp)//Conditionalststement
printf("Numberisarmstrongnumber");

getch();
}

STUDENTS 3K

FRESHERS

STUDY RESOURCES

MORE >>

Filed Under: Important Programs


Tagged With: C, LAB, Programs

Search this website

C PROGRAMMING GUIDE...

EDUCATIONAL LOAN GUIDE

CAREER GUIDANCE FOR ALL

RANDOM MATERIALS :
Data Mining and Data Warehousing
Difference Between Class and
Primitive Types
Database Roles in SQL

STUDENTS 3K

CASE Expression in SQL


Concurrent Update Problem
HOME

STUDENTS+

FRESHERS

STUDY RESOURCES
Adsby Google

SourceCode
CProgram

FOLLOW US ON FACEBOOK

Adsby Google

ProgramC++
FunctionProgram

ADVERTISEMENT

MORE >>

STUDENTS 3K
HOME

STUDENTS+

FRESHERS

STUDY RESOURCES

Adsby Google

SQLProgram
ProgramCode

COMPANY PROFILE

CATEGORIES

About Students3k

Important Programs

Contact Us

Study Abroad

Earn Money Online

IT Companies

Website Archive Page

Career Guidance for Students

Privacy Policy

Teachers

Disclaimer

Verbal Analogies

MORE >>

STUDENTS 3K

WE ARE SOCIAL
Facebook Fans
HOME

STUDENTS+

FRESHERS

STUDY RESOURCES

Twitter Follow
Google Plus
Pinterest Page

Copyright 2012 - 2016 Students3k.com All Rights Reserved Designed By Benets

MORE >>

Você também pode gostar