switch语句的运用、c++中生成随机数需要头文件#include<time.h> 并且需要srand((int)time(NULL));语句来生成随机种子(否则生成的随机数唯一不变),再
用rand()%(Y-X+1)+X来表示生成从X~Y的随机数,平时需要注意注释