Frage im Vorstellungsgespräch bei SAP

I was asked to write algorithm for finding right angled triangle , Code snippets from java.