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 does void main return?

606


Can we use visual studio for c?

551


What does struct node * mean?

601


How do we print only part of a string in c?

587


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2201






Should a function contain a return statement if it does not return a value?

597


How can I read data from data files with particular formats?

605


Implement bit Array in C.

676


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

653


Tell me when would you use a pointer to a function?

608


all c language question

1873


Differentiate fundamental data types and derived data types in C.

618


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2334


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

579


Do you have any idea about the use of "auto" keyword?

666