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 are shallow and deep copy?
Explain the differences between private, public and protected and give examples.
How do you invoke a base member function from a derived class in which you have not overridden that function?
Explain deep copy and a shallow copy?
What is class invariant in c++?
What is #include cstdlib in c++?
What are proxy objects in c++?
What is the difference between delegation and implemented-in-terms-of?
What do you mean by static variables?
What are special characters c++?
Tell me an example where stacks are useful?
Briefly describe a B+ tree. What is bulk loading in it?
What is DlgProc?
What are pointer-to-members? Explain.
How can I learn c++ easily?