Pergunta de entrevista da empresa Calsoft

coding problem in c# to implement