标题:输出??
只看楼主
dreamhouse
Rank: 1
等 级:新手上路
帖 子:107
专家分:7
注 册:2011-12-16
结帖率:59.46%
 问题点数:0 回复次数:1 
输出??
#include<iostream>
void main()
{
    int month=1;
        char *season=NULL;
        switch(month){
        case 12:
            season="winter";
                break;
        case 1:
            season="winter";
            break;
        case 2:
            season="winter";
            break;
        case 3:
        case 4:
        case 5:
            season="spring";
            break;
        case 6:
        case 7:
        case 8:
            season="summer";
            break;
        case 9:
        case 10:
        case 11:
            season="autumn";
            break;
        default:
                season="bogus month";
        }
            printf("april is in the  " ,season);

}
搜索更多相关主题的帖子: spring void include summer 
2012-12-21 16:23
georgeliuyan
Rank: 2
等 级:论坛游民
帖 子:8
专家分:18
注 册:2010-11-13
得分:0 
printf("april is in the  " ,season);这句就没有输出啊,%s!!!
2012-12-22 14:51



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




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

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