/*
I want to know why this program gives me a segmentation error. Kindly note that I\'ve solved this problem by changing the value of variable k from 0 t