// ex_ch6_11.c
#include <stdio.h>
#include <math.h>

const int SIZE = 8;

int main(void)
{
	int powers[SIZE];

	// populate the array with powers of 2
	for (int count = 0; count < SIZE; count++)
	{
		 powers[count] = (int)powf(2, count);
	}

	// display the values using a quite stupid do-while-loop
	// initialize counter
	int counter = 0;
	do
	{
		printf("%d ", powers[counter]);
		counter++;
	} while (counter < SIZE);

	return 0;
}