int score;
printf("请输入一个学生的成绩:");
scanf("%d", &score);
if (score < 60)
printf("不及格");
else if (score < 70)
printf("及格");
else if (score < 80)
printf("中等");
else if (score < 90)
printf("良好");
else if (score < 100)
printf("优秀");
return 0;
}
int main()
{
int x, g;
srand((unsigned)time(NULL));
x = rand() % 10;
printf("请猜一个数:");
scanf("%d", & g);
if (x = g)
printf("完全正确");
else if (g < x)
printf("小了");
else if (g > x)
printf("大了");
return 0;
}