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
the first character in the variable name must be an a) special symbol b) number c) alphabet
What is private, public and protected inheritance?
What is a sequence in c++?
How many ways can a variable be initialized into in C++?
How are Structure passing and returning implemented by the compiler?
What is the precedence when there is a global variable and a local variable in the program with the same name?
write a program that reads in a file and counts the number of lines, words, and characters. Your program should ask the user to input a filename. Open the file and report an error if the file does not exist or cannot be opened for some other reason. Then read in the contents of the file and count the number of lines, words, and characters in the file. Also print additional information about the file, such as the longest and shortest words, and longest and shortest lines. For simplicity, we define a word to be one or more characters ending with white space (a space, tab, carriage return, etc.). Functions for checking the types of characters can be found in the ctype.h header file, so you want to include this header file in your program. For example, the sentence below could be all that is in a file. This sentence IT 104 is taught in C++. has 32 characters, one line, and six words. The shortest line is 32 characters. The longest line is 32 characters. The shortest word is 2 characters. The longest word is 6 characters
Explain how we implement exception handling in c++?
What is tellg () in c++?
daily Routine of father
Explain what is polymorphism in c++?
Can we make copy constructor private in c++?
Does c++ support multilevel and multiple inheritances?
List the advantages of inheritance.
Why pointer is used in c++?