Not able to take user input

I am not able to take input from the user in my code. I have written the code for taking input from the user for the linked list and the display it. The code runs fine if I take single digit inputs like 1 , 2, 3, 4, 5 and display it perfectly but if I take double digit inputs like 10, 20 , 30, 40, 50, it only shows 10 as the output. please tell whats wrong in my code.
my code- https://ide.codingblocks.com/s/660081

hi @tanishqbatra0511,

you wrote cin>>i change that to any other variable


for(int i=0;i<=n;i++){

    int data;
    cin>>data;
    insertattail(head,data);
}`

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.