标题:加\n和没加\n输入时为什么会有区别呢?
取消只看楼主
尽在天涯
Rank: 1
等 级:新手上路
帖 子:18
专家分:1
注 册:2012-11-17
结帖率:50%
 问题点数:0 回复次数:0 
加\n和没加\n有什么区别
#include<stdio.h>
main()
{
    int a,b;
    int max;
    printf("input two numbers:\n");
    scanf("%d%d",&a,&b);
    max=a;
    if(max<b) max=b;
    printf("max=%d\n",max);
}


#include<stdio.h>
main()
{
    int a,b;
    int max;
    printf("input two numbers:\n");
    scanf("%d%d\n",&a,&b);
    max=a;
    if(max<b) max=b;
    printf("max=%d\n",max);
}
搜索更多相关主题的帖子: numbers 
2013-06-15 23:16



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




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

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