可汗小点兵
都去上早操!这是一个随机选人程序,可以从指定的n个人中随机选出m位去做早操。 1234567891011121314151617181920212223242526272829303132333435363738#include <stdio.h>#include <stdlib.h>#include <time.h>int main() { // 六个人的名单 char *people[] = {"王星", "王柏", "莫奈", "姚祉", "肖鑫", "石安"}; int n, i, temp; int selected[6] = {0}; // 标记是否被选中 // 初始化随机数种子 srand((unsigned int)time(NULL)); // 输入要抽取的人数 printf("请输入要抽取的人数(1-6):"); scanf(&quo...