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
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 |
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 |
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 |
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
What is a virtual destructor? Explain the use of it?
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Write about the members that a derived class can add?
Why preincrement operator is faster than postincrement?
What is c++ course?
Write about the use of the virtual destructor?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?
Can malloc be used in c++?
Which sort does c++ use?
How is new() different from malloc()?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL