正在加载图片...
Include <stdio . h> maino int score; 方法一程序 printf(" Please enter score: ) scanf( %d",&score); if( score<0‖ score>100)/对输入数据的合法性进行检查* printf(Input error!\ni 在else分支嵌套 else if tscore > 90) 没有ee会怎样? printf( %d--excellent\n", score): else if (score >=80) rinf("yod--good \n", score); else if (score >=70 printf( %od-fit exactly\n", score) else if( score》60) printf( %d--passn", score) Ise printf( yod--fail \n", score)6 #include <stdio.h> main() { int score; printf("Please enter score:"); scanf("%d", &score); if (score < 0 || score > 100) /*对输入数据的合法性进行检查*/ printf("Input error!\n"); else if (score >= 90) printf("%d--excellent\n", score); else if (score >= 80) printf("%d--good\n", score); else if (score >= 70) printf("%d—fit exactly\n", score); else if (score >= 60) printf("%d--pass\n", score); else printf("%d--fail\n", score); } 方法一程序 • 在else分支嵌套 • 没有else会怎样?
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有