标题:我这样觉得太密了,用花括号怎么进行分段
只看楼主
sunyh1999
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:14
帖 子:1178
专家分:3032
注 册:2009-5-17
得分:0 
源代码:
#include <stdio.h>
int main(void)
{
    int ff;
    printf("you:");
    scanf("%d", &ff);
    if(ff % 2==0)
        printf("%d",ff);
    if((ff%2)%2==0)
    printf("YES%d\n\n\n\n",ff);
    else
        if(ff>10)
            printf("%d>10",ff);
        else
        printf("%d<10",ff);
    return 0;
}
分段后的代码:
#include <stdio.h>
int main(void)
{
    int ff;
    printf("you:");
    scanf("%d", &ff);
    if(ff % 2==0){ printf("%d",ff);}
    if((ff%2)%2==0)
    {printf("YES%d\n\n\n\n",ff);}
    else
        {if(ff>10)
            {printf("%d>10",ff);
        {else
        printf("%d<10",ff);}
    return 0;
}}
}

欢迎来到我的博客:http://blog..cn/noisunyuhong
2010-07-28 10:07



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




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

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