Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Differentiate between calloc and malloc.

1239


is it possible to create your own header files?

1066


How was c created?

1009


Can we initialize extern variable in c?

1098


c program to compute AREA under integral

2360


What is the difference between ā€˜g’ and ā€œgā€ in C?

3946


How can you call a function, given its name as a string?

1116


What does the function toupper() do?

1079


What is data types?

1043


write a program to print largest number of each row of a 2D array

2284


Apart from dennis ritchie who the other person who contributed in design of c language.

1345


Why is c used in embedded systems?

1087


How can I find out the size of a file, prior to reading it in?

1130


What is huge pointer in c?

1040


Explain what is dynamic data structure?

1132