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

When should overload new operator on a global basis or a class basis?

0 Answers  


How a macro differs from a template?

0 Answers  


What is abstraction c++?

0 Answers  


What is flush programming?

0 Answers  


What are the various compound assignment operators in c++?

0 Answers  






Explain the problem with overriding functions

0 Answers  


What flag means?

0 Answers  


What are destructors?

0 Answers  


write a C++ programming using for loop: * * * * * * * * * *

4 Answers   TCS,


Describe public access specifiers?

0 Answers  


Write a C program to calculate the salary of each employee in your company. You need to input the hours worked and the hourly rate. The company pays 1.5 times the hourly rate for all hours worked in excess of 48 hours. Use the formulas below to calculate the salary: if employee worked less than 48 hours salary = hours * rate; if employee worked more than 48 hours salary = 48.0 * rate + ( hours &#8722; 48.0 ) * rate * 1.5; You are required to use a loop to produce the sample output as given below.

1 Answers  


What is the difference between public, private, protected inheritance?

12 Answers   Wipro,


Categories