Login to ask a question from C programs on various integers

C Program to Print Armstrong Number from 1 to 1000

This is a C Program to print armstrong number from 1 to 1000.

Problem Description

This C Program print armstrong number from 1 to 1000.

Problem Solution

An Armstrong number is an n-digit base b number such that the sum of its (base b) digits raised to the power n is the number itself. Hence 153 because `1^3 + 5/3 + 3^3 = 1 + 125 + 27 = 153.`

Program/Source Code

/*

 * C Program to Print Armstrong Number from 1 to 1000

 */

#include

 

main()

{

    int number, temp, digit1, digit2, digit3;

 

    printf("Print all Armstrong numbers between 1 and 1000:\n");

    number = 001;

    while (number .... Show More

Previous Question Next Question
🔗

Similar Questions

From C programs on various integers · C programming

View All
WhatsApp