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

Answer Posted / nikita

#include<stdio.h>
#include<math.h>
void main()
{
int a;
double c;
scanf("%5d",&a);
c=pow(a,2);
printf("%f",c);
}

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is NULL pointer?

664


Why array is used in c?

541


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5449


c program for searching a student details among 10 student details

1636


What is the difference between ++a and a++?

674






Find MAXIMUM of three distinct integers using a single C statement

612


What tq means in chat?

569


`write a program to display the recomended action depends on a color of trafic light using nested if statments

1621


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

639


Which is better pointer or array?

583


What are data types in c language?

576


How do we open a binary file in Read/Write mode in C?

661


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

612


How can you pass an array to a function by value?

588


How do you print only part of a string?

598