when the user types in ls i want the program to show the listed files in his directory but it is not working i cant list the files can anyone help ? this is what i have done so far. it breaks fine when the user enters x
while(1)
{
printf("\ntype 'ls' to see your whats in your current directory or press x to continue ");
scanf("%s", &input);
if(input == 'x')
{
break;
if (input != 'x')
{
system(input);
break;
}
}
}