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 special characters c++?
What are friend classes?
Why we use #include iostream in c++?
In c++, what is the difference between method overloading and method overriding?
What new()is different from malloc()?
Give an example of run-time polymorphism/virtual functions.
Which of the following is evaluated first: a) && b) || c) !
Is c++ the hardest programming language?
How does com provide language transparency?
What is meant by iomanip in c++?
How much is c++ certification?
Do you know what are pure virtual functions?
Why we use #include conio h in c++?
What is vector string in c++?
How is objective c different from c++?