用for while 成绩的有效输入

时间:2023-03-09 17:52:34
用for while 成绩的有效输入
#include "stdio.h"
void main()
{
int score,s;
printf("请输入你的成绩:");
scanf("%d",&s);
score=s;
for(;score<||score>;) {
printf("您输入有误,请重新输入:");
scanf("%d",&score);
}
while(score<=&&score>=)
{
printf("你的成绩是:%d",score);
score=score+;
}
}