write a program that takes 5 digit no and calculate 2 power
that no and print it.
Answer Posted / yeah
#include<iostream.h>
#include<math.h>
void main()
{
int a,n=1,i;
cout<<"enter Num";
cin>>a;
//n=pow(2,a);
for(i=0;i<a;i++)
n*=2;
cout<<n;
}
Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
What is the basic concept of c++?
What are iterators in c++?
What is the purpose of ios::basefield in the following statement?
What is #include iomanip?
What is vector processing?
How the keyword struct is different from the keyword class in c++?
Which bit wise operator is suitable for turning off a particular bit in a number?
Differentiate between C and C++.
Why would you use pointers in c++?
What is the use of c++ programming language in real life?
Differentiate between late binding and early binding. What are the advantages of early binding?
What are the advantages of inheritance in c++?
What is polymorphism in c++? Explain with an example?
What is runtime polymorphism in c++?
Is c# written in c++?