Add solution of card problem in c