标题:请指教
取消只看楼主
追求者——材
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2018-4-19
结帖率:0
已结贴  问题点数:10 回复次数:0 
请指教
#include <stdio.h>
int main(void)
{
char a,b,d,e,f,g;
a='a';
b='b';
d='d';
printf("请输入第一个小写字母:");
scanf("%c",&a);
printf("请输入第二个字母:");
scanf("%c",&b);
printf("请输入第三个字母:");
scanf("%d",&d);
e=a;
f=b;
g=d;
a=a-32;
b=b-32;
d=d-32;
printf("%c,%c,%c\n%d,%d,%d",a,b,d,e,f,g);
}
求教这个程序不能按要求正常运行的原因
#include <stdio.h>
 main()
{
    int a,b;
    scanf("%5d",&a);
    printf("a=%d\n",a);
    scanf("%5d%3d",&a,&b);
    printf("a=%d\nb=%d\n",a,b);
}
这个程序怎么理解?
搜索更多相关主题的帖子: stdio printf 输入 字母 scanf 
2018-04-19 17:01



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-486198-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013323 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved