Added user input for the size of the dimensions. Illustrated use of both a size_t variable index and the use of the size(dim) method.