runtime error(sigsegv) in chef and integers question

Actually my code is correct and it is not showing any errors in ideone.com .but here it is showing this error.need help.!!