how to write the coding for this type of question

Printable View