C Program to Check Armstrong Number

preview_player
Показать описание

Lets write a C program to check whether user entered number is Armstrong or not.

Armstrong number: is a number that is equal to the sum of cubes of its individual digits.

Example: If user input the number 371. It’s individual digits are 3, 7 and 1. Lets cube each digit: 3 x 3 x 3 + 7 x 7 x 7 + 1 x 1 x 1 = 27 + 343 + 1 = 371.

The user entered number 371 is equal to the sum of cube of its individual digits. So 371 is a Armstrong number.

C Programming Interview / Viva Q&A List


C Programming: Beginner To Advance To Expert
Рекомендации по теме
Комментарии
Автор

Hi sir,
In this video you are explaning for only 3 digits .. what if the user inter any number like 10 ..2..153 . How can i write a general code for checking any number???
Please answer me if u can🖤

aseeldee.
Автор

For 3rd step that is after getting 1 as quotient how to add that

rajeshwarimaladakar