Pergunta de entrevista da empresa Upstox

Design a 5x5 Grid with input boxes which accept either a number or a formula. Show preview of each input under that input. If it's a formula, show result of that formula otherwise show the number.