您好,我已经在这里坐了很长时间,试图弄清楚为什么这不起作用,但我没有成功!
#include <stdio.h>
main(void)
{
int mark;
printf("Please enter the mark\n");
scanf("%d", &mark);
switch(mark){
case (mark <40):
printf("That's a fail");
break;
case (mark >=40 && <60):
printf("That's a pass");
break;
case (mark >=60 && <70):
printf("That's a merit");
break;
case (mark >=70):
printf("That's a distinction");
break;
}
}