add the 2nd solutionto 5-4.c