i tested this solution in IntelliJ and it worked there. not sure why the app didn't accept it. I used the abs method and the results display correctly...