Microsoft interview question

Implement Digital Watch in C++