Hexaware Technologies interview question

Brief Introduction and asked to write Prime number, Sorting Programs on notepad