Okay, so I missed the "i = i + 1" bit there. Can't imagine why you would want to add sort of random amounts to people's salaries like that, but I've given up being surprised at the homework assignments that people describe here.
Anderson gave himself the promotion. So I gave myself this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java