分支-06. 成绩转换

 1 /* Main.c
 2  * B6-分支-06. 成绩转换(15)
 3  *
 4  *  Created on: 2014年5月28日
 5  *      Author: Boomkeeper
 6  *
 7  *  测试通过
 8  */
 9 
10 #include <stdio.h>
11 #include <stdlib.h>
12 
13 void judge(int* p)
14 {
15     if(*p>=90 && *p<=100)
16         printf("A\n");
17     if(*p>=80 && *p<90)
18         printf("B\n");
19     if(*p>=70 && *p<80)
20         printf("C\n");
21     if(*p>=60 && *p<70)
22         printf("D\n");
23     if(*p>=0 && *p<60)
24         printf("E\n");
25     exit(0);
26 
27 }
28 
29 int main()
30 {
31     int score=0;
32     int *p_s=&score;
33 
34     scanf("%i",&score);
35     judge(p_s);
36     return 0;
37 
38 }

 

posted @ 2014-06-16 13:20  Boomkeeper  Views(275)  Comments(0Edit  收藏  举报
最好的流量统计 网站流量计数器