A Algorithm Example Code For C