You'll want to follow Norm's advice and look at substring to do it a more efficient way. But to fix your way, make sure you look at value j in the print statement.