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

What is the modulus operator?

1260


Write a code to generate a series where the next element is the sum of last k terms.

1292


Explain output of printf("Hello World"-'A'+'B'); ?

1562


What is I ++ in c programming?

1170


What is pointer to pointer in c language?

1214


What is the difference between array and linked list in c?

1210


What is wrong with this declaration?

1160


Are pointers integer?

1080


What does main () mean in c?

1148


What's the total generic pointer type?

1109


What is difference between structure and union in c programming?

1178


What is a lookup table in c?

1177


Is c object oriented?

1020


Is it fine to write void main () or main () in c?

1078


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

1112