pass triangle in c