Pregunta de entrevista de Infosys

Asked me write a very simple algorithm based on microprocessor