c语言纠错:n个人围成一个圈,从一开始报数报到3的倍出去,问留下的最后一人原来是多少号.#include#includeint main (){ int n,i,j,k; int *p; k=0; printf("please enter the number of the people:"); sc
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/30 04:09:17
c语言纠错:n个人围成一个圈,从一开始报数报到3的倍出去,问留下的最后一人原来是多少号.#include#includeint main (){ int n,i,j,k; int *p; k=0; printf("please enter the number of the people:"); sc
c语言纠错:n个人围成一个圈,从一开始报数报到3的倍出去,问留下的最后一人原来是多少号.
#include
#include
int main ()
{
int n,i,j,k;
int *p;
k=0;
printf("please enter the number of the people:");
scanf("%d",&n);
for(i=1;i
c语言纠错:n个人围成一个圈,从一开始报数报到3的倍出去,问留下的最后一人原来是多少号.#include#includeint main (){ int n,i,j,k; int *p; k=0; printf("please enter the number of the people:"); sc
帮你把程序调试通过了,自己先对比着看,有不懂的可以问.
#include
#include
int main (int argc, char **argv)
{
int n,i,j,k,c;
int *p;
k=0;
printf("please enter the number of the people:");
scanf("%d",&n);
p = (int *)malloc(n*sizeof(int));
for(i=1;i