solved Problem009 by C