#include "stdio.h"
void main()
{
    int score;
    do 
    {
        printf("请输入你的成绩(0-100):");
        scanf("%d",&score);
    }while(score<0||score>100);
    printf("你的成绩为:%d",score);
}

do-while循环判断成绩的有效输入

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-27
  • 2021-12-17
  • 2021-05-16
  • 2022-01-17
  • 2021-07-27
  • 2022-12-23
  • 2021-05-10
相关资源
相似解决方案