用C语言和数据结构编写一个简单的程序(求源代码)

生活 时间:2026-04-02 08:07:37 阅读:3629
用C语言和数据结构编写一个简单的程序(求源代码)

最佳回答

优秀的黄蜂

羞涩的枕头

2026-04-02 08:07:37

排列不对,如果有0呢?

最新回答共有4条回答

  • 老迟到的咖啡
    回复
    2026-04-02 08:07:37

    排列不对,如果有0呢?

  • 平淡的鸵鸟
    回复
    2026-04-02 08:07:37

    #include"stdio.h" typedef struct node { int num; node *next; int checked; }lnode,*llist; void main() { char ch; llist l=NULL; lnode *t; int checkedcount,rcount; int a[6],i,j,k,record[1000]={0},n=1; int b[6]={1,10,100,1000,10000,1000****}; ch=' '; i=0; printf("输入数字:"); while(ch!='\n') { lnode *p=new lnode; scanf("%d",&p->num); p->next=l; l=p; i++; ch=getchar(); } rcount=0; for(j=1;jnext) t->checked=0; for(k=0;knext) if(t->num==a[k]&&t->checked==0) { t->checked=1; checkedcount++; break; } } if(checkedcount==i) { record[rcount]=j; rcount++; } } for(j=0;j

  • 忐忑的火
    回复
    2026-04-02 08:07:37

    #include "stdio.h" void main() { char a[6]; int i=0,j,k,s,p; printf("please intput num:\n"); while((ch=getch())!='\r') { a[++i]=ch; if(i==6) { printf("only can input 6 wei shu!\n"); break;} } for(i=0;i<6;i++) for(j=0;j!=i;j++) for(k=0;k!=i&&k!=j;k++) for(s=0;s!=i&&s!=j&&s!=k;s++) for(p=0;p!=i&&p!=j&&p!=k&&p!=s;p++) printf("%d%d%d%d%d%d ",a[i],a[j],a[k],a[s],a[p]); }

上一篇 谜语大全及答案

下一篇 有性'巴'的么?