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
Can I learn c++ in a week?
What is a float in c++?
Which is most difficult programming language?
Explain the difference between static and dynamic binding of functions?
What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard
What is c++ in english?
Explain the concept of copy constructor?
How does list r; differs from list r();?
Can you explicitly call a destructor on a local variable?
Differentiate between structure and class in c++.
What is ios class in c++?
Can static member variables be private?
Is c++ free?
How can I improve my c++ skills?
Is std :: string immutable?