把scanf("&d", a);改为scanf("%d", &a);int类型输入输出格式是%d,不是&d输入数据需要传地址以便返回提取的数据
scanf("&d", a);
scanf("%d", &a);
int
%d
&d
scanf("%d",&a)