终端(T) 运行(R) 查看转到G) 先择(S) 帮助(H) 234.c-.vscode-Visual StudioCode
X
C123.c C234.c X
C234.c>main(void)
#include<stdio.h
2 intmain(void)
charx11,x12;
5 printf(“Pleease enter two characters x11 and x12.\n”);
G scanf(“%c%c“,x11,X12);
printf(“x11=%c;x12=%c\n",x11,x12)
8
9 return 0;
16
xe
调试控制台 输出 终端 问题 区powershell十血
Windows Powershel1
版权所有(C)MicrosoftCorporation。保留所有权利。
尝试新的跨平台PowerShel1https://aka.ms/pscore6
PS C:\Users\DELLl.vscodel.vscodel.vscode>gcc 234.c
PS C:\UsersDELL\.Vscodel.vscodel.vscode> .a.exe
Pleease enter two characters x11 and x12.
ab
PS C:\Users\DELL.Vscodel.vscodel.vscode>
Win32 CRLF 空格:4 行5,列59 UTF-8 R
scanf("%c%c",x11,x22);
改为
scanf("%c%c",&x11,&x22);
输入要用地址
写为:scanf("%c%c",&x11,&x22);
即可
有帮助望采纳~
scanf("%c%c",&x11,&x12); //少地址符&