终端(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就截止了,后面的printf不见了!
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
- CSDN专家-赖老师(软件之家) 2021-10-06 22:51关注
scanf("%c%c",x11,x22); 改为 scanf("%c%c",&x11,&x22);
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥50 永磁型步进电机PID算法
- ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
- ¥88 找成都本地经验丰富懂小程序开发的技术大咖
- ¥15 如何处理复杂数据表格的除法运算
- ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
- ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
- ¥200 uniapp长期运行卡死问题解决
- ¥15 latex怎么处理论文引理引用参考文献
- ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
- ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?