scanf_s("%d",&temp);scanf_s("%c",&num,1);scanf_s("%c",&enter,1);
scanf_s("%d",temp);temp 变量前面少了 & 取变量地址
改成
scanf_s("%d",&temp);