Adding solution for problem 44 in c.