1.Between 100 and 999 are some numbers that have the
characteristics that if you cube the individual digits and
sum together you will get the same number.

2. A program that can accept as input an integer and output
the equivalent of that number in words.

Answer Posted / leosoft

#include<stdio.h>
#include<math.h>
int a,b,c;
int main()
{

for(a=0;a<=9;a++)
{
for(b=0;b<=9;b++)

{
for(c=0;c<=9;c++)

if ((a*a*a)+(b*b*b)+(c*c*c)==(100*a)+(10*b)+(c))

printf("\nThe Numbers are :%d",(100*a)+(10*b)+(c));
}
}
return 0;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?

746


What can I safely assume about the initial values of variables which are not explicitly initialized?

714


Write a program to find the Fibonacci series recursively.

710


What is a constant reference?

705


Tell me difference between constant pointer and pointer to a constant.

746






What is low level language in simple words?

643


What is DlgProc?

685


Why use of template is better than a base class?

736


Is c++ harder than java?

675


How do I exit turbo c++?

672


What is c++ in english?

653


What is the basic difference between C and C++?

709


What are the three forms of cin.get() and what are their differences?

716


What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required

669


what is upcasting in C++?

825