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


Please Help Members By Posting Answers For Below Questions

What is the basic concept of c++?

659


What are iterators in c++?

683


What is the purpose of ios::basefield in the following statement?

889


What is #include iomanip?

635


What is vector processing?

767






How the keyword struct is different from the keyword class in c++?

678


Which bit wise operator is suitable for turning off a particular bit in a number?

737


Differentiate between C and C++.

798


Why would you use pointers in c++?

716


What is the use of c++ programming language in real life?

654


Differentiate between late binding and early binding. What are the advantages of early binding?

676


What are the advantages of inheritance in c++?

751


What is polymorphism in c++? Explain with an example?

690


What is runtime polymorphism in c++?

684


Is c# written in c++?

622