Frage im Vorstellungsgespräch bei Bosnet Distribution

How to optimize the code without using hard coded line?