Do yourself a favour and sort out your indentation!
If nothing else, it would make it obvious to you what the problem is!
main()
{ int number,index;
list tet;
char ch;
printf("Enter y if u want to input:\n");
tet=bucket[0];
scanf("%c",&ch);
while(ch=='y'){
printf("Enter numbers\n");
scanf("%d\n",&number);
add_to_list(number/10,number);
scanf("%c",&ch);
}
show();
}
}
Formatted:
main(){
int number,index;
list tet;
char ch;
printf("Enter y if u want to input:\n");
tet=bucket[0];
scanf("%c",&ch);
while(ch=='y'){
printf("Enter numbers\n");
scanf("%d\n",&number);
add_to_list(number/10,number);
scanf("%c",&ch);
}
show();
}
}
Or better, don't use 1TB
main()
{
int number,index;
list tet;
char ch;
printf("Enter y if u want to input:\n");
tet=bucket[0];
scanf("%c",&ch);
while(ch=='y')
{
printf("Enter numbers\n");
scanf("%d\n",&number);
add_to_list(number/10,number);
scanf("%c",&ch);
}
show();
}
}
Your other code is even better at hiding things...:laugh: