Write an algorithm to determine a class form even percentage

no idea what that even means, but whatever you want to program, I'm sure someone has posted a code snippet to do what you want.