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 / thirunavukkarasu
#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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the unique features of C++.
What is object oriented programming (oop)?
Can we declare a base-class destructor as virtual?
How do I write a c++ program?
Explain the differences between private, public and protected and give examples.
What are associate containers?
Is ca high or low level language?
Is c++ low level?
Write a Program for find and replace a character in a string.
Is c++ vector dynamic?
What is the copy-and-swap idiom?
Can we use clrscr in c++?
What are the benefits of operator overloading?
How the keyword struct is different from the keyword class in c++?
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.