int i=-1 ;while((i<0 || i>100){printf("请输入值:");scanf("%d",&i);if(i<0 || i>100)printf("值必须在1-100之间,请重新输入值:");}