Pregunta de entrevista de Cognizant

basic coding questions related to numerical problems