Write the program form Armstrong no in c++?
Answers were Sorted based on User's Feedback
Answer / ankit,rohit
#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0,n,m,i;
clrscr();
scanf("%d",&i);
n=i;
m=n;
while(n>0)
{
m=n%10;
sum=sum+(m*m*m);
n=n/10;
}
if(i==sum)
{
printf("the given number is amstrong");
else
printf("the given number is not amstrong");
}
getch();
}
| Is This Answer Correct ? | 20 Yes | 22 No |
How do we implement inheritance in c++?
write a C++ programming :if the no is between 32 to 50 it will be odd.
Is c++ a pure oop language?
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
What is the use of namespace std in C++?
How did c++ start?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
Write about the access privileges in c++ and also mention about its default access level?
Can non graphic characters be used and processed in C++?
What is exception handling? Does c++ support exception handling?
What is time h in c++?
What is singleton pattern in c++?