#include<iostream>#include<windows.h>#include<time.h>#include<fstream>#include<algorithm>using namespace std;string str[]={"A1","A2","A3","A4","A5","A6","A7","A8","B1","B2","B3","B4","B5","B6","B7","B8","C1","C2","C3","C4","C5","C6","C7","C8"};void test(){srand(int(time(NULL)));random_shuffle(str,str+24);ofstream f;f.open("out.csv",ios::out);if(!f.is_open()){printf("温馨提醒,请关闭表格文件。") ;return ;}for(int i=0;i<24;i++){printf("第%2d号: ",i+1);cout<<str[i]<<" ";f<<str[i]<<endl;if((i+1)%6==0)printf("\n ______________________________________________________________________________________\n\n\n ");}f.close();}bool A(){HANDLE hHandle=NULL;hHandle=CreateMutex(NULL,FALSE,"Demo");if(GetLastError()==ERROR_ALREADY_EXISTS){exit(1);return false;}else{test();}return true;}int main(){char quit;printf("\n\n\n ");A();printf("\n\n\n 实验抽号 ");do{scanf("%c",&quit);}while(quit!='X');return 0;}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。