give a number as input and it displays a linked list with each digit as data of each node