Answer Posted / vinay k bharadwaj
dear frd your ans is wrong.
#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0,n,m,x;
clrscr();
scanf("%d",&n);
m=n;
while(n>0)
{
x=n%10;
n=n/10;
sum=sum+(x*x*x);
}
if(sum==m)
printf("number is armstrong");
else
printf("number is not armstrong");
getch();
}
| Is This Answer Correct ? | 87 Yes | 47 No |
Post New Answer View All Answers
Explain the use of vtable.
What is null pointer and void pointer and what is their use?
Is it possible for a member function to delete the pointer, named this?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
How can I learn c++ easily?
Eplain extern keyword?
What are structures and unions?
Can I learn c++ as my first language?
You run a shell on unix system. How would you tell which shell are you running?
Why do we need constructors in c++?
What is scope in c++ with example?
Which of the following is not a valid declaration for main() a) int main() b) int main(int argc, char *argv[]) c) They both work
What does new in c++ do?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
How are pointers type-cast?