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 / thirunavukkarasu
#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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can I improve my c++ skills?
Is c++ a good first language to learn?
Can we make any program in c++ without using any header file and what is the shortest program in c++.
How does a copy constructor differs from an overloaded assignment operator?
When do you call copy constructors?
What is meant by a delegate?
Explain explicit container.
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
How a macro differs from a template?
Discussion on error handling of C++ .
What is the best ide for c++?
How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?
What is enum c++?
Explain linked list using c++ with an example?
Explain the virtual inheritance in c++.