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

If POINT + ZERO = ENERGY, then E + N + E + R + G + Y = ?

0 Answers   HCL,


If the ticket sales s for a company increases 25% from standard sales to 60 tickets sold, then 60-s=

1 Answers  


A man how many bikes of Rs 14000 can buy by selling 2100 bikes of Rs500/- of each

0 Answers   Ramco,


I AM WRITING RAILWAY EXAM OF C GROUP,I NEEDED QUESTION AND ANSWERS PLEASE MAIL ME FOR SRIKANTH.BALRAM@GMAIL.COM,URGENTLY NEEDED PLEASE

0 Answers   RRB,


at central state college the ratio of the number of students taking spanish to the number of taking french is 7:2,if 140 students taking french,how many are taking spanish

2 Answers  






A anb B working seperately can do a piece of work in and 12 days respectively . if they work for a day alternatively , A begining , in how many days ,the work will be completed..(** please give the explanation**)

2 Answers   Accenture, IndiGo, Maersk,


i want andhra bank modelpapers of clerical aptitude plz send it to my mail swetha.gouru@gmail.com.plz

0 Answers  


A lorry averages 55mph for the first 4 hours of a trip and averages 70 mph for each additional hour. The average speed for entire trip was 60 mph. How many hours long is the trip? a)14 b)12 c)11 d)8 e)6

3 Answers  


Perimeter of the back wheel = 9 feet, front wheel = 7 feet on a certain distance the front wheel gets 10 revolutions more than back wheel . what is the distance?

5 Answers   ABC, CMC, Ramco,


4 thieves rob a bakery of the breadone after the other. each thief takes half of what is present ,& half a bread.if at the end 3 bread remains,what is the no of bread that was present initiallly?

0 Answers   IBM,


complete the series ? 126 161 63 71 79 25 29 33 37 8 10 12 14 16 1 2 3 4 5 6

5 Answers   Satyam,


Complete the series..2 2 12 12 30 30 ?

0 Answers   HCL, Infosys,


Categories