C_Melody 2021-10-06 22:50 采纳率: 100%
浏览 58
已结题

输出时到了scanf就截止了,后面的printf不见了!

img

                                          终端(T) 运行(R) 查看转到G) 先择(S) 帮助(H234.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 016
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 空格:45,列59 UTF-8 R
  • 写回答

3条回答 默认 最新

  • 关注
    
    scanf("%c%c",x11,x22);
    改为
    scanf("%c%c",&x11,&x22);
    
    
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 10月14日
  • 已采纳回答 10月6日
  • 创建了问题 10月6日

悬赏问题

  • ¥15 怎样才能让鼠标沿着线条的中心线轨迹移动
  • ¥60 用visual studio编写程序,利用间接平差求解水准网
  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?