001、
#include <stdio.h> int main(void) { int i; do { puts("0: stone; 1: scissors; 2: colth"); printf("i = "); scanf("%d", &i); if(i > 2 || i <0) { puts("the proper range is 0 ~ 2."); } } while(i > 2 || i < 0); switch(i) { case 0: puts("you had choosed: stone"); break; case 1: puts("you had choosed: scissors"); break; case 2: puts("you had choosed: cloth"); break; } return 0; }