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
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
What is static function? Explain with an example
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
How many types of modularization are there in c++?
What are signs of manipulation?
What is public, protected, private in c++?
Explain the use of virtual destructor?
What is stream and its types in c++?
What is code reusability in c++?
Name four predefined macros.
What do you mean by delegate? Can a user retain delegates?
Why is null pointer used?
Define a nested class. Explain how it can be useful.
Define stacks. Provide an example where they are useful.
How do you declare A pointer to a function which receives nothing and returns nothing