编辑代码

#include <stdio.h>
int main () {
    int type;
    printf("请输入你的type值:");
    scanf("%d", &type);

    if ( type == 1 )
       printf("你好");
    else if ( type == 2 )
       printf("早上好");
    else if ( type == 3 )
       printf("晚上好");
    else if ( type == 4 )
       printf("再见");
    else
       printf("什么sb,滚");
    return 0;
}  

//#include <stdio.h>
//int main (){
    //switch(type){
        //case 1: //case后面的1表示type==1
        //printf("你好");
        //break;
        //case 2:
        //printf("早上好");
        //break;
        //case 3:
        //printf("晚上好");
        //break;
        //case 4;
        //printf("再见");
        //break;
        //default:
        //printf("什么sb,滚");
    //}
    //return 0;
//}