全文预览

汇总-C和C++面目汇总

上传者:随心@流浪 |  格式:pdf  |  页数:80 |  大小:8494KB

文档介绍
pause'*);\rreturn0;\r)\r{|no.\r#include<stdio.h>\r#include<malloc.h>\rtypedefstructNode\r(\rintindex;\rstructNode*next;\r}JosephuNode;\rintJosephu(intn,intm)\r(\rinti,j;\rJosephuNode*head,*tail;\rhead=tail=(JosephuNode*)malloc(sizeof(JosephuNode));\rfor(i=1;i<n;++i)\r(\rtail->index=i;\rtail->next=(JosephuNode*)malloc(sizeof(JosephuNode));\rtail=tail->next;\r)\rtail->index=i;\rtail->next=head;\rfor(i=1;tail!=head;++i)\r(\rfor(j=1qj<m;++j)\r(\rtail=head;\rhead=head->next;\r)\rtail->next=head->next;\rprintf("st4dGDu?R;.t4dQ\n"Pi,head->index);\rfree(head);\rhead=tail->next;\r)\ri=head->index;EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rfree(head);\rreturni;\r)\rintmain()\r(\rintn,m;\rscanf("%d%dH,&n,&m);\rprintf("vwxy?;tdQ!\nH,Josephu(n,m));\rsystem("pause'1);\rreturn0;\r)\r<P

收藏

分享

举报
下载此文档