#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,i,rem,sum=0,n;
clrscr();
printf("enter value of A:");
scanf("%d",&a);
printf("enter value of B:");
scanf("%d",&b);
for(i=a;a<=b;i++)
{
rem=n%10;
sum=sum+(rem*rem*rem);
n=n/10;
if(sum==n)
{
printf("\n%d",a);
}
}
getch();
}
No comments:
Post a Comment