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
How does class accomplish data hiding in c++?
What is meaning of in c++?
Who was the creator of c++?
Declare a class vehicle and make it an abstract data type.
What is the default access level?
What return value must conversion operators have in their declaration?
What are the main features of c++?
Why do we use constructor?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
How do you define/declare constants in c++?
Is c++ still in demand?
What is oop in c++?
What is a binary file? List the merits and demerits of the binary file usagein C++.
How do you clear a buffer in c++?
If there are two catch statements, one for base and one for derived, which should come first?