2011年4月23日 星期六

分享

高中生程式解題系統 a003: 兩光法師占卜術

#include <stdio.h>


int main(void) 
{

    int month;
    int day;
    int score;

    while(scanf("%d %d",&month,&day)!=EOF)
    {
        score = (month*2+day)%3;

        switch(score)
        {
        case 0:
            printf("普通\n");
            break;
        case 1:
            printf("吉\n");
            break;
        case 2:
            printf("大吉\n");
            break;
        }

    }
    
    return 0;
}

沒有留言:

張貼留言