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
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
What does the nocreate and noreplace flag ensure when they are used for opening a file?
What is abstraction c++?
What is the insertion operator and what does it do?
What are pointer-to-members? Explain.
What does it mean to declare a member variable as static?
What does namespace mean in c++?
What is the use of endl in c++?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
Is python written in c or c++?
How do c++ struct differs from the c++ class?
How do you define a class in c++?
What is c++ redistributable?
Is c++ low level?
Should I learn c or c++ or c#?