write a program that takes 5 digit no and calculate 2 power
that no and print it.
Answers were Sorted based on User's Feedback
Answer / venkataramakrishna.danduri
#include <iostream.h>
void main()
{
int b = 0;
int num5digit;
cin>>num5digit;
b = 1<< num5digit;
cout<<"b = "<<b;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kathir
#include<iostream.h>
void main()
{
int a,n=0;
cout<<"Enter the 5 didgit no:"<<endl;
cin>>a;
n=(a*a);
cout<<"The two power given no is:"<<n<<endl;
}
| Is This Answer Correct ? | 4 Yes | 6 No |
Answer / 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 |
How does atoi function work?
Difference between pass by value and pass by reference?
How const functions will be treated by compiler?
When the design recommends static functions?
What is c++ vb?
Difference between Abstraction and encapsulation in C++?
Which bit wise operator is suitable for putting on a particular bit in a number?
What is unary operator? List out the different operators involved in the unary operator.
Write a program to get the value of sin (x) using a library function , when x is given in degrees.
What is switch case in c++ syntax?
How is an Abstract Base Class(ABC) related to an "Abstract Data Type" (ADT)
Which programming language's unsatisfactory performance led to the discovery of c++?