Put the 20 questions in a list or similar data structure.
Choose an index (between 0 and "list length") at random.
Take the question at that list index, remove question from list.
Repeat (with the now smaller list) until you have 5 questions.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…