counter

Free Hit Counter

C program to find power

Q: program to find the power of any number without using the function power


#include
#include
void main()
{
int no1,no2,i=1;
long int power=1;
printf("enter two nombers :);
scanf("%d",&no1);
scanf("\n%d",&no2);
while(no2>i)
{
power=power*x;
i++;
}
printf("%d",power);
getch();
}




No comments:

Post a Comment