A former lottery computer programmer has pleaded guilty in Iowa to running a criminal scheme that allowed him to collect millions of dollars in lottery winnings in four other states.