Program 11

#include <stdio.h>
#include <conio.h>
void main () {
int x, y, z, num, a, b;
printf(“Three-digits number:”);
scanf(“%d”,&num);
a=num;
x=num%10;
num=num/10;
y=num%10;
num=num/10;
z=num%10;
b=((x*x*x)+(y*y*y)+(z*z*z));
printf(“Sum of cube of digits = %d”, b);
if (a==b)
printf(“\nNumber is armstrong”);
else
printf(“\nNumber is not armstrong”);
getch();
}

M.Bakhtiar Zuberi
I'm M.Bakhtiar Zuberi, the owner of 3DPixelz.com and its network websites. I've been web-developing & graphics-designing for the past 7 years, since the age of 11. I like to work with PHP/HTML and Photoshop/Illustrator. Part-time developer of ZCL (crypto-currency) and ETC. I love to blog here and write for Tribune in my free time.

Leave a Comment

Kindly solve the following puzzle to prove that you\'re not a bot: