#include<stdio.h>
#include<conio.h>
void main()
{
int number,sum=0,temp,reminder;
clrscr();
printf("Enter any digit - ");
scanf("%d",&number);
 temp=number;
  while(temp!=0)
  {
   reminder=temp%10;
   sum=sum+reminder*reminder*reminder;
   temp=temp/10;
  }
   if(number==sum)
    printf("digit is Arm-strong");
     else
    printf("digit is not Arm-strong");
   getch();
 }
INPUT
Enter any digit - 371
OUTPUT
digit is Arm-strong

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA