Popular C Program – Check Armstrong Number in C

Listening of Armstrong Number first of all comes what’s Armstrong number. Armstrong Number is a special number that is equal to sum of cubes of its own digits for example 153 , 407 and so on…

C Language is Basic Language .. Many Advanced Language have come still if u can understand basic language carefully u can do all other languages in easy way. So here is our efforts of giving programs which are well executed in our Rubal Solutions Server and confirm to be running successfully. we have our c programming full tutorial on rubal solutions you tube channel. u can learn theory and practical’s from there … ask any queries if needed.

Let’s Check

153 = (1*1*1)+(5*5*5)+(3*3*3)  
where:  
(1*1*1)=1  
(5*5*5)=125  
(3*3*3)=27  
So:  
1+125+27=153 
#include <stdio.h>
int main()
{
printf("Welcome to Rubal Solutions\n\n");
printf("Do Like Comment Share and Subscribe To Our Youtube Channel\n\n");
int n,r,sum=0,temp;    
printf("enter the number=");    
scanf("%d",&n);    
temp=n;    
while(n>0)    
{    
r=n%10;    
sum=sum+(r*r*r);    
n=n/10;    
}    
if(temp==sum)    
printf("%d is armstrong  number",temp);    
else    
printf("%d is not armstrong number",temp);    
 
return 0;
}

 1,430 total views,  1 views today

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

About This Site

We are Rubal Solutions.

A Youtuber Content Creator .

Make Videos On Various Education and Knowledgeable Content.

Rubal Solutions Youtube Videos
Follow and Support On

Address:

Facebook- https://www.facebook.com/rubalsolutions/

Twitter – https://twitter.com/ruby0071

Instagram – https://www.instagram.com/rubalsolutions

Blogger – https://rubalsolutions.blogspot.com/