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
Can member data be public?
What is expression parser in c++
What is object in c++ example?
Which is the best c++ compiler for beginners?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
Write a Program for find and replace a character in a string.
Explain virtual destructor?
What is an operator in c++?
How the programmer of a class should decide whether to declare member function or a friend function?
Can I uninstall microsoft c++ redistributable?
How do you flush a buffer in c++?
What are static member functions?
Who created c++?
What is a responder chain?
How does list r; differs from list r();?