char s[10]; scanf("%s",&s);
错误,char的输入方式有两种%c和%d , 一般为%c 。你这里的%s错误
char s[10]; scanf("%s",&s);字符串输入,输入语句 应改为:char s[10];scanf("%s",s);