Armco Inc., a diversified steelmaker, said strong shipments of flat rolled steel helped it post a profit in the last quarter and end 1987 with a net annual profit of just over $117 million. The company said its net profit was $3.1 million for the fourth quarter, compared to a profit of $34.6 million in the fourth quarter of 1986. It had a full-year 1986 loss of $472 million. Carbon steel shipments rose 25% in the quarter and nearly 18% for the year. Shipments in the fourth quarter were the highest quarterly total since the third quarter of 1981, the Parsippany, N.J.-based firm said.