I'm not too sure why you say that int y is uninitialized.
I was also wondering about the endl thing. One tutorial I read used it all the time, othertimes it used \n. The book I'm reading now uses \n and in future efforts I will use \n.
What else could I use besides system ("cls");? Remember, this is only my second program.