I am learn about using arrays and i need help
#include <cstdio>
#include "simpio.h"
#include "strlib.h"
#include <iostream>
using namespace std;
#define Max 6
int main()
{
int power2[Max], i, n;
for (i=1; i<=32; i++)
{
power2[i] = i;
i = i*2;
}
for(n = 0; n<=Max; n++)
{
printf("%d ",power2[n]);
}
system("pause");
}
The outcome is not write. any help
-858993460 1 -858993460 3 -858993460 -858993460 -858993460 Press any key to continue...