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
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?
What can I safely assume about the initial values of variables which are not explicitly initialized?
Write a program to find the Fibonacci series recursively.
What is a constant reference?
Tell me difference between constant pointer and pointer to a constant.
What is low level language in simple words?
What is DlgProc?
Why use of template is better than a base class?
Is c++ harder than java?
How do I exit turbo c++?
What is c++ in english?
What is the basic difference between C and C++?
What are the three forms of cin.get() and what are their differences?
What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required
what is upcasting in C++?