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
What does void main return?
Can we use visual studio for c?
What does struct node * mean?
How do we print only part of a string in c?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Should a function contain a return statement if it does not return a value?
How can I read data from data files with particular formats?
Implement bit Array in C.
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.
Tell me when would you use a pointer to a function?
all c language question
Differentiate fundamental data types and derived data types in C.
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
Do you have any idea about the use of "auto" keyword?