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
Explain queue. How it can be implemented?
What is function prototyping? What are its advantages?
What is class definition in c++ ?
How can a called function determine the number of arguments that have been passed to it?
Differentiate between declaration and definition.
What is the use of this pointer in c++?
What do you mean by “this” pointer?
How do you flush std cout?
What are virtual functions in c++?
What is the purpose of templates in c++?
What are arithmetic operators?
What are the advantages of c++? Explain
What are function prototypes?
What is name hiding in c++?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that