This happens because `/` on ints returns a float. You want to use `div` 
instead, which is integer division.
    
    
    var maxLignes = ((nombreDePyramides + 2) * (nombreDePyramides + 3)) div 2 - 
4
    

Or, alternatively, convert it – this is clearly the inferior solution, but 
given here for completeness:
    
    
    var maxLignes = int((nombreDePyramides+2)*(nombreDePyramides+3)/2-4)
    

In both cases, you do not need to give the type because it is derived from the 
expression.

Reply via email to