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
What is an adjust field format flag?
Do the parentheses after the type name make a difference with new?
Mention the purpose of istream class?
What is vector pair in c++?
What is the difference between containment and delegation?
What is helper in c++?
Explain the concept of friend function in c++?
What is srand c++?
What is a tuple c++?
What is the most powerful coding language?
Keyword mean in declaration?
How we can differentiate between a pre and post increment operators during overloading?
Should I learn c or c++ or c#?
What is nested class in c++?
What will the line of code below print out and why?