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=100;a<=999;a++)
{
for(b=100;b<=999;b++)
{
for(c=100;c<=999;c++)
if (a*a*a+b*b*b+c*c*c==100*a+10*b+c)
printf("The Numbers are :%d %d %d",a,b,c);
}
}
}
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What is the output of the following program? Why?
Define pure virtual function?
What is size of string in c++?
Is swift a good first language?
What is the use of cmath in c++?
What is a friend function in c++?
Mention the purpose of istream class?
Explain the virtual inheritance in c++.
Why are pointers not used in c++?
What is main function in c++ with example?
What is #include iostream?
Why do we need c++?
What c++ is used for?
How to allocate memory dynamically for a reference?
Describe the role of the c++ in the tradeoff of safety vs. Usability?