Bhuvan InfoTech Android App

Download our Android App and browse Technical News, Projects, Computer Tricks more easily with lots of Interesting Features.

Tuesday, June 14, 2016

Find power of any number | C program

#include<stdio.h>
int main()
{
    int ac, b, i, p;
    printf("Type value of X: ");
    scanf("%i",&ac);
    printf("Type value of Y: ");
    scanf("%i",&b);   
    p=1;
    for(i=1;i<=b;i++)
        p = p * ac;
    printf("Power is : %i",p);
 return 0;
}
Bhuvan Arora

No comments:

Amazing Deal !