triangle.cpp : check input is in scope