fork download
#include <stdio.h>
int main (){
    int a,b;
    scanf("%d",&a);
    scanf("%d",&b);
    printf("%d月%d日",a,b);
    switch(a){
        case 1:
            if((20<=b)&&(b<=31))
            printf("水瓶座");
            else if((1<=b)&&(b<=19))
           printf("山羊座");
    
    case 2:
    if((1<=b&&b<=18))
    printf("水瓶座");
    else if((19<=b)&&(b<=28))
    printf("魚座");
    
    case 3: 
    if ((1<=b&&b<=20))
    printf("魚座");
    else if((21<=b)&&(b<=31))
    printf("牡羊座");
    
    case 4: 
    if ((20<=b)&&(b<=31))
    printf("牡牛座");
    else if((1<=b)&&(b<=20))
    printf("牡羊座");
    
    case 5: 
    if ((21<=b)&&(b<=30))
    printf("双子座");
    else if((1<=b)&&(b<=21))
    printf("牡牛座");
    
    case 6: 
    if ((1<=b)&&(b<=21))
    printf("双子座");
    else if((21<=b)&&(b<=31))
    printf("蟹座");
    
    case 7: 
    if ((1<=b)&&(b<=22))
    printf("蟹座座");
    else if((23<=b)&&(b<=31))
    printf("獅子座");
    
    case 8: 
    if ((1<=b)&&(b<=22))
    printf("獅子座");
    else if((23<=b)&&(b<=31))
    printf("乙女座");
    
    case 9: 
    if ((1<=b)&&(b<=22))
    printf("乙女座");
    else if((23<=b)&&(b<=31))
    printf("天秤座");
    
    case 10: 
    if ((1<=b)&&(b<=23))
    printf("天秤座");
    else if((24<=b)&&(b<=31))
    printf("蠍座");
    
    case 11: 
    if ((1<=b)&&(b<=22))
    printf("蠍座");
    else if((23<=b)&&(b<=31))
    printf("射手座");
    
    case 12: 
    if ((1<=b)&&(b<=21))
    printf("射手座");
    else if((22<=b)&&(b<=31))
    printf("山羊座");
    
    return 0;
    }}
    
    
Success #stdin #stdout 0.01s 5284KB
stdin
11 2
stdout
11月2日蠍座射手座