[change] changed second for loop with foreach loop in printTriangle