fork(1) download
  1. #include <stdio.h>
  2. int main(int argc, char const *argv[])
  3. {
  4. float score;
  5. printf("请输入你的成绩 ");
  6. scanf("%f", &score);
  7. if (score < 0 || score > 100)
  8. {
  9. printf("请输入0-100的数值\n");
  10. }
  11. else if (score >= 90){
  12. printf("A\n");
  13. }else if (score >= 80){
  14. printf("B\n");
  15. }else if (score >= 60) {
  16. printf("C\n");
  17. }else{
  18. printf("E\n");
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 5288KB
stdin
85
stdout
请输入你的成绩  B