Tag Archive for power

function power

/* function power */

#include <stdio.h>

int main (int argc, const char * argv[]) {
    int i;
    for(i=0; i<10; i++)
        printf("2 hoch %i ist %i
", i, power(2,i));
}

int power(int x, int n){
    int i,p;
    p=1;
    for(i=1; i<=n; i++)
        p=p*x;
    return(p);
}

source

See if the power is connected on MacBook

ioreg -l | grep ExternalConnected | cut -d'=' -f 2

source