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.

Answers were Sorted based on User's Feedback



1.Between 100 and 999 are some numbers that have the characteristics that if you cube the individua..

Answer / leosoft

#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 ?    2 Yes 0 No

1.Between 100 and 999 are some numbers that have the characteristics that if you cube the individua..

Answer / 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

1.Between 100 and 999 are some numbers that have the characteristics that if you cube the individua..

Answer / 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

More C++ General Interview Questions

Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02

0 Answers  


When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?

0 Answers  


how to find the maximum of 10 numbers ?

5 Answers  


What is the real purpose of class – to export data?

0 Answers  


What is the precedence when there is a global variable and a local variable in the program with the same name?

0 Answers  






Explain the properties and principles of oop.

0 Answers  


what is a reference variable in C++?

0 Answers  


Why do we need c++?

0 Answers  


what is static function

2 Answers   Patni,


Explain polymorphism?

0 Answers  


What do you mean by late binding?

0 Answers  


What would happen on forgetting [], while deallocating an array through new?

0 Answers  


Categories