国庆前老师布置了C程序作业,今天上网无聊,所以就下了个Win-TC写作业,题目很简单,因为我也只能做简单的,呵呵!把题目和程序代码发出来,留念下。

题目:输入考试成绩,80-100分输出评语Very good!,60-79分输出评语good!,10-59分输出评语fair,0-39分输出评语poor。

main()
{
    float x;
    printf("Welcome To My Blog\nPlease input your score:");
    scanf("%f",&x);
    if(x>=80 && x< =100)
        printf("Very Good!");
    else
    if(x>=60 && x< =79)
        printf("Good!");
    else
    if(x>=40 && x< =59)
        printf("Fair");
    else
    if(x>=0 && x< =39)
        printf("Poor");
    getch();
}