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
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---
Does c++ have string data type?
What is a wchar_t in c++?
What is namespace & why it is used in c++?
What is a block in c++?
What do the keywords volatile and mean mutable?
How many ways can a variable be initialized into in C++?
When should you use global variables?
What is a constructor and how is it called?
What are references in c++? What is a local reference?
Explain polymorphism?
Why the usage of pointers in C++ is not recommended ?
What is the difference between equal to (==) and assignment operator (=)?
What's the hardest coding language?
What is the use of turbo c++?