Domanda di colloquio di SAP

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