Write a program that takes a 5 digit number and calculates 2
power that number and prints it
Answer Posted / manish soni bca 3rd year jaipu
#include<stdio.h>
#include<conio.h>
void main()
{
int n,p;
long int ans;
printf("Enter the number ans power");
scanf("%d %d",&n,&p);
ans=1;
while(p>0)
{
ans*=n;
p--;
}
printf("%ld",ans);
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Differentiate between calloc and malloc.
is it possible to create your own header files?
How was c created?
Can we initialize extern variable in c?
c program to compute AREA under integral
What is the difference between āgā and āgā in C?
How can you call a function, given its name as a string?
What does the function toupper() do?
What is data types?
write a program to print largest number of each row of a 2D array
Apart from dennis ritchie who the other person who contributed in design of c language.
Why is c used in embedded systems?
How can I find out the size of a file, prior to reading it in?
What is huge pointer in c?
Explain what is dynamic data structure?