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
In the derived class, which data member of the base class are visible?
What is c strings syntax?
What is anonymous object in c++?
What are c++ data types?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What is an associative container in c++?
What is setfill c++?
What is the difference between a baller and a reference in C++?
What is the syntax for a for loop?
How will you call C functions from C ++ and vice-versa?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
What do you mean by const correctness?
What is an adjust field format flag?
What c++ is used for?
What are the various arithmetic operators in c++?