The outer most if statement tests for double on the two die rolls. The next if statement is nested inside of the true part of the first if statement. This if statement tests for snake eyes. The third if statement is nested inside of the else part of the second if statement. This if statement test for box cars.