#include <stdio.h>

int pot(int a, int b)
{
    int potencia = 1;

    for(int i = 0; i<b; i++)
        {
            potencia = potencia * a;   
        }
    
    return potencia;
}

int main()
{
    printf("Fala meu bom, bota dois numeros inteiros positivos e veja a mágica acontecer🙅\n");
    printf ("le numéro inférieur e magique\n");

    int x;
    int y; 

    scanf("%i", &x);
    scanf("%i", &y);

    int potencia = pot(x, y);

    printf("deu %i\n", potencia);
    printf("deu %i\n", potencia );

    return 0;
}


Embed on website

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