I\'m a complete beginner in c++. I want to know why my first for loop worked fine and output the last element that I added. But the second for loop was unable to out