Richey,
Here is the Script BASIC version of your example.
FOR i = 0 TO 10
PRINT "2 TO THE POWER OF ",i," IS ",2^i,"\n"
NEXT
jrs@laptop:~/sb/sb22/test$ time scriba pow.sb
2 TO THE POWER OF 0 IS 1
2 TO THE POWER OF 1 IS 2
2 TO THE POWER OF 2 IS 4
2 TO THE POWER OF 3 IS 8
2 TO THE POWER OF 4 IS 16
2 TO THE POWER OF 5 IS 32
2 TO THE POWER OF 6 IS 64
2 TO THE POWER OF 7 IS 128
2 TO THE POWER OF 8 IS 256
2 TO THE POWER OF 9 IS 512
2 TO THE POWER OF 10 IS 1024
real 0m0.003s
user 0m0.000s
sys 0m0.002s
jrs@laptop:~/sb/sb22/test$
I also rewrote the C BASIC version as well.
#include <stdio.h>
#include <math.h>
#include "cbasic.h"
MAIN
BEGIN_FUNCTION
DIM AS int i;
DEF_FOR (i = 0 TO i <= 10 STEP INCR i)
BEGIN_FOR
PRINT ("2 TO THE POWER OF %d IS %0.f\n", i, pow(2,i));
NEXT
RETURN_FUNCTION (0);
END_FUNCTION
jrs@laptop:~/c_basic$ gcc cpow.c -lm -o cpow
jrs@laptop:~/c_basic$ time ./cpow
2 TO THE POWER OF 0 IS 1
2 TO THE POWER OF 1 IS 2
2 TO THE POWER OF 2 IS 4
2 TO THE POWER OF 3 IS 8
2 TO THE POWER OF 4 IS 16
2 TO THE POWER OF 5 IS 32
2 TO THE POWER OF 6 IS 64
2 TO THE POWER OF 7 IS 128
2 TO THE POWER OF 8 IS 256
2 TO THE POWER OF 9 IS 512
2 TO THE POWER OF 10 IS 1024
real 0m0.002s
user 0m0.000s
sys 0m0.002s
jrs@laptop:~/c_basic$
Here is the expanded version without the C BASIC clothes.
#include <stdio.h>
#include <math.h>
int main (int argc, char** argv)
{
int i;
for (i = 0 ; i <= 10 ; ++ i)
{
printf ("2 TO THE POWER OF %d IS %0.f\n", i, pow(2,i));
}
return (0);
}