Question d’entretien chez SAP

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