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

hello i have cleared the exam for clerical post in SBI n now i wish to know bout the type of questions asked in the interview... i m very tensed.. pls let me know if anyone has any idea about it..

0 Answers  


The largest rubber producer in the world__________

4 Answers  


. Select the correct statement a. NEXT SENTENCE and CONTINUE functionally does the same. b. Never can code a DECLARE CURSOR statement in procedure division. c. Edited numeric characters can be included in arithmetic operations. d. The Sub parameters of a DCB parameter are Keyword parameters.

0 Answers  


A is twice efficient than B. A and B can both work together to complete a work in 7 days. Then find in how many days A alone can complete the work?

0 Answers   Accenture, BSNL,


BOTH WHICH TEAM IN FINAL IPL 2009 & WHO IS WIN

7 Answers  






There are some 20 Basketball players & 30 Football players, and 25 cricket players. 1 of them plays all the three games. 8 of them plays at least two games. They are 50 altogether. How many of them plays none of the games.

0 Answers   Verifone,


find a no which gives remainders as follows for the divider..divider and remainder are for 9 remainder is 8,for 8 its 7,for 7 remainder is 6, for 6 remainder is 5, for 5 remainder is 4, for 4 its 3, for 3 its 2 and for 2 its 1

1 Answers  


A person has to go both Northwards&Southwards in search of a job. He decides to go by the first train he encounters.There are trains for every 15 min both southwards and northwards.First train towards south is at 6:00 A.M. and that towards North is at 6:10 .If the person arrives at any random time,what is the probability that he gets into a train towards North.

0 Answers   Infosys,


what is the difference between deviation & change control? what is trouble shooting?

1 Answers   Zydus Cadila,


if f(x)=1/x**2 , then f(f(f(x)))

0 Answers   DSQ Software,


Which one of the following is correct a) $$Z(4).99 b) $9(4)zz.99 c) A(4)BB d) +9(5).99CR

0 Answers  


Given the sequence A, BB, CCC, DDDD...........and so on , the 240th letter in the sequence will be: a) V b) U c) T d) W

6 Answers   Broadcom, TCS,


Categories