欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

如何计算星座

程序员文章站 2022-06-12 16:03:30
...

    //判定星座

    string constell_names[12][2]={
        {"山羊座","水瓶座"},
        {"水瓶座","双鱼座"},
        {"双鱼座","白羊座"},
        {"白羊座","金牛座"},
        {"金牛座","双子座"},
        {"双子座","巨蟹座"},
        {"巨蟹座","狮子座"},
        {"狮子座","处女座"},
        {"处女座","天枰座"},
        {"天枰座","天蝎座"},
        {"天蝎座","射手座"},
        {"射手座","山羊座"}
    };

    // 各月份跨星座的日期
    int constell_data[] = {20,19,21,20,21,22,23,23,23,24,23,22};

    //计算星座
     value_daughter_constell = constell_names[value_birth_month-1][value_birth_day/constell_data[value_birth_month-1]];
相关标签: C++学习