#include "stdafx.h"
using namespace System;
void main()
{
array^ primes = gcnew array {1,2,3,5,7,11,13,17};
interior_ptr ip = &primes[0];
int total = 0;
while(ip != &primes[0] + primes->Length)
{
total += *ip;
ip++;
}
Console::WriteLine(total);
}