/* power.c: computes 2^d * * John Rust, University of Maryland, February, 2004 */ int power(int d) { int i,twod; if (d == 0) { return 1; } else { twod=2; for (i=1; i