有1到8个数,求这个区间所有四个数的组合!高分

我本来就叫顾影 2003-10-15 10:00:14
要有源代码!
...全文
44 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
rainstormmaster 2003-10-16
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/2329/2329539.xml?temp=.8654901
bbgbianbaogui 2003-10-16
  • 打赏
  • 举报
回复
for i=1111 to 8888
{
qw=i/1000
bw=(i-qw*1000)/100
sw=(i%100)/10
gw=i%10
if(qw=bw or qw=sw or qw=gw or bw=sw or bw=gw or sw=gw) then
;
else print i
}
charles8513 2003-10-15
  • 打赏
  • 举报
回复
# include "iostream.h"
# include "stdio.h"
main()
{
int a[8];
int i,j,k,l;
int t;
for(i=0;i<8;i++)
a[i]=i+1;
for(i=0;i<8-3;i++)
for(j=1;j<8-2;j++)
for(k=2;k<8-1;k++)
for(l=3;l<8;l++)
{
t=(t+1)%80;
if (t%6==0)
cout<<endl;
cout<<a[i]<<","<<a[j]<<","<<a[k]<<","<<a[l]<<" ";
if (t==0)
{cout<<"Press any key to continue!";
getchar();}
}
}
wenhongL 2003-10-15
  • 打赏
  • 举报
回复
dim i as int
dim j as int
for i=1 to 8
for j=1 to 8
str=i & j
next
next
lwm1977 2003-10-15
  • 打赏
  • 举报
回复
多重循环

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧