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
Write a recursive program to calculate factorial in c++.
What are protected members in c++?
Why #include is used?
Explain what are the sizes and ranges of the basic c++ data types?
Is c# written in c++?
Array base access faster or pointer base access is faster?
How would you use the functions sin(), pow(), sqrt()?
Which compiler does turbo c++ use?
To which numbering system can the binary number 1101100100111100 be easily converted to?
How do you clear a set in c++?
If there are two catch statements, one for base and one for derived, which should come first?
What is general form of pure virtual function? Explain?
Is main a class in c++?
Is c++ low level?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?