Infosys interview question

write a basic code on creating an artificial digital clock in the computer