Improve solution of problem-1 in c
coding style
Coding style