Each of the five students - Andy, Danny, Ellen, Janice and Sammy received different marks in a mathematics quiz which was held last week. Students who made correct statements had obtained higher scores than those who made incorrect statements.
The following are the statements made by the five students:
Sammy: Andy and Ellen gained the top two places.
Janice: No, what Sammy just said is incorrect.
Danny: I was ranked in between Sammy and Janice.
Andy: Janice came second.
Janice: I had obtained a lower score than Ellen.
Ellen: Exactly three of the previous five statements are correct.
Determine the order in which the five students finished.