Code error to find the largest element

Unable to find whats wrong in the code