Write a program that takes a 5 digit number and calculates 2
power
that number and prints it.

Answers were Sorted based on User's Feedback



Write a program that takes a 5 digit number and calculates 2 power that number and prints it. ..

Answer / shubham

#include<iostream.h>
#include<math.h>
void main()
{
int a,b,q,r;
long double d;
cout<<"Enter a ";
cin>>a;
d=pow(2,a);
cout<<"powered = "<<d;
}

Is This Answer Correct ?    1 Yes 0 No

Write a program that takes a 5 digit number and calculates 2 power that number and prints it. ..

Answer / anish

#include<stdio.h>
#include<maths.h>
#include<conio.h>
main()
{
int a,b;
printf("Enter 5 digit num");
scanf("%d",&a);
printf("the 5th power of %d is %dpow5",a,a);
getch();
}

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More General Aptitude Interview Questions

Find the correct meaning of the following phrase: To be in the air

0 Answers   Hexaware,


In a mixture R is two parts, S is one part . In order to mixture how much R is to be added.

0 Answers   Accenture, TCS,


A car has front 30 and rear 20. If front rotate 240 time. Find back wheel rotation.

5 Answers   3D PLM,


Area of triangle=(1/2)*b*h base increased by 4 times & height is divided by 2, the net effect of area?

0 Answers   Wipro,


if A = D, B=E, C=F, SHOOT = ?

0 Answers   Baan Infotech,






A cycled from P to Q at 10 kmph and returned at the rate of 9 kmph. B cycled both ways at 12 kmph. In the whole journey B took 10 minutes less than A. Find the distance between P and Q.

0 Answers   Accenture,


How many tangents can be drawn with in three circles if they do not lie with in each other

2 Answers   Geometric Software,


give me the pervious years question paper of sbi clerical exam

0 Answers  


In a flight of 600 km, an aircraft was slowed down due to bad weather. Its average speed for the trip was reduced by 200 km/hr and the time of flight increased by 30 minutes. The duration of the fligh is?

0 Answers  


The Parallelogram PQRS, the line RS have midpoint T from line PQ. What is the ratio of Triangle PTS / parallelogram PQRS?

0 Answers   Cap Gemini,


How many minimum links need to be cut in a chain having 23 links to seperate it into single links

3 Answers   Franklin Templeton,


Petrol from a full tank was poured into 3 containers A, B and C. Container A stored 1/4 of the petrol. Container B stored 1/3 as much petrol as Container A. Container C stored 93.8 litres more than Container B. How much petrol was poured into the 3 containers altogether?

2 Answers  


Categories