Program to calculate power of any number in C

#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
 {
            int a, b, c;
            clrscr();
            printf("*** Power ***");
            printf("\nNumber : "); scanf("%d", &a);   
            printf("Power : "); scanf("%d", &b);
            c = pow(a,b);
            printf("\nCalculated Power : ");
            textcolor(YELLOW);
            printf("%d", c);
            getch();
}


Post a Comment