Regarding taking input

is there any easy way to take input of a linked list without using any function

you have to use function to take input