The number 945842 (nine hundred forty-five thousand eight hundred forty-two) is written in Roman numerals as follows: CMXLVDCCCXLII