全文预览

C和C++面目

上传者:似水流年 |  格式:pdf  |  页数:82 |  大小:10113KB

文档介绍
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 = 1^ j < m; + +j)\r(\rtail = head;\rhead = head-> next;\r)\rtail-> next = head-> next;\rprintf("ab4d 1.c<#b4d ;\n", i, head-> index);\rfree(head);\rhead = tail-> next;\r)\ri = head-> index;\rfree(head);\rreturn i;\r)\rint main()\r(\rint n, m;\rscanf("%d%d", &n, &m);\rprinl("efgh#bd ;m \n", Josephu(n, m));\rsystem ("pause");\rreturn 0;.\r<p

收藏

分享

举报
下载此文档