#include <stdio.h>
#include <stdlib.h>
 main (){
 

int a, b, c, cont=1;

printf("Digite um numero para ser a base: ");
scanf("%d", &a);
printf("Digite um numero para ser o expoente: ");
scanf("%d", &b);

c=b;

while (b>0){
    cont=cont*a;
    b--;
   }
printf("%d elevado a %d eh: %d",a,c,cont);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: