A man who admitting to rigging the Iowa lottery was sentenced to up to 25 years in prison in a Des Moines courtroom.