Triangle exercise | 1st iteration