Calculate the bth power of a in C language

Calculate the bth power of a in C language

long apowerb(int a, int b)
{
    int i, r = 1;
    for(i = 0; i < b; i++) {
        r*=a;
	}

    return r;
}

Comments

Popular posts from this blog

Python Receiving and parse JSON Data via UDP protocol

ubus lua client method and event registration code demo/example