[ create a new paste ] login | about

Link: http://codepad.org/qyg55krR    [ raw code | output | fork ]

C, pasted on Jul 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>

int
main(void)
{
  int             score;
  char            s[] = "DDDDDDCBASS";
  if (printf("点数 = "), scanf("%d", &score) == 1 && 0 <= score && score <= 100) {
    switch (score /= 10) {
    default:
      printf("%c\n", s[score]);
      break;
    }
  }
  return 0;
}


Output:
1
点数 = 


Create a new paste based on this one


Comments: