| 查看: 1142 | 回复: 5 | |||
| 当前主题已经存档。 | |||
[交流]
如果你玩双色球,这个小程序可能能帮助你拿500万大奖哦。
|
|||
|
program Shuangseqiu interface function random10(lbound,ubound) implicit none real:: lbound, ubound real:: random10(33) end function end interface !------------------------------------------------------------ interface function random11(lbound,ubound) implicit none real:: lbound, ubound real:: random11(16) end function end interface !----------------------------------------------------------- integer :: jie(6),s,ij,ik,ikk,io real ::a(33),b(16) integer:: aa(33),kpp,ll,aaa(33),oo integer:: bb(16), bbb(16) integer:: red(6) real:: kp Print*, 'This is a program written in 2008-11-13,for ShuangSeQiu Games' Print*, '------This is a present for Xiao LV ShiXiong from LWL--------' call random_seed() a=random10(1.0,33.0) do ij=1,33 do ik=ij+1,33 if(a(ik).ge.a(ij)) then kp=a(ij) a(ij)=a(ik) a(ik)=kp endif enddo enddo do ikk =1,33 if(ikk.gt.16) goto 145 bb(ikk)=0 145 continue aa(ikk)=0 enddo do ikk =1,33 a(ikk)=int(a(ikk)) do io=1,33 if(a(ikk).eq.io) aa(io)=aa(io)+1 enddo enddo !--------------------------------------- b=random11(1.0,16.0) do ikk =1,16 b(ikk)=int(b(ikk)) do io=1,16 if(b(ikk).eq.io) bb(io)=bb(io)+1 enddo enddo !--------------------------------------- do oo=1,33 if(oo.gt.16) goto 123 bbb(oo)=oo 123 continue aaa(oo)=oo enddo !--------------------------------------------- do ij=1,33 do ik=ij+1,33 if(aa(ik).ge.aa(ij)) then oo=aaa(ij) aaa(ij)=aaa(ik) aaa(ik)=oo kpp=aa(ij) aa(ij)=aa(ik) aa(ik)=kpp endif enddo enddo !--------------------------------------------------- do ij=1,16 do ik=ij+1,16 if(bb(ik).ge.bb(ij)) then oo=bbb(ij) bbb(ij)=bbb(ik) bbb(ik)=oo kpp=bb(ij) bb(ij)=bb(ik) bb(ik)=kpp endif enddo enddo !------------------------------------------------ Write(*,*) '+++++++++++++++++++++++++++++++++++++' Write(*,*) 'The Red Six one is here: From 1--33' Write(*,*) '++++++++++++++++++++++++++++++++++++++' do ik=1,6 write(*,*)ik,aaa(ik), aa(ik) red(ik)=aaa(ik) enddo do ik=1,6 do ij=ik+1,6 if(red(ij).ge.red(ik)) then oo=red(ik) red(ik)=red(ij) red(ij)=oo endif enddo enddo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Write(*,*) '+++++++++++++++++++++++++++++++++++++' Write(*,*) 'The Blue Two one is here: From 1--16' Write(*,*) '++++++++++++++++++++++++++++++++++++++' do ik=1,2 write(*,*)ik,bbb(ik), bb(ik) enddo Write(*,*) '---------The 500 Million is Here--Please enjot it---------------' write(*,"(6(i2,1x),'**',1x,2(i2,1x))" red(6),red(5),red(4),red(3),red(2),red(1) &, bbb(1),bbb(2) Print*, 'Good Luck-Good Luck-Good Luck-Good Luck-Good Luck-Good Luck-Good Luck' end function random10(lbound,ubound) real:: len real:: random10(33) real:: lbound, ubound real t integer i len=ubound-lbound do i=1,33 call random_number(t) random10(i)=lbound+len*t enddo return end function random11(lbound,ubound) real:: len real:: random11(16) real:: lbound, ubound real t integer i len=ubound-lbound do i=1,16 call random_number(t) random11(i)=lbound+len*t enddo return end [ Last edited by woshilsh on 2008-11-29 at 16:09 ] |
» 猜你喜欢
有没有人能给点建议
已经有5人回复
假如你的研究生提出不合理要求
已经有12人回复
实验室接单子
已经有7人回复
全日制(定向)博士
已经有5人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
参与限项
已经有3人回复
对氯苯硼酸纯化
已经有3人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复
shxincui518
铜虫 (正式写手)
- 应助: 1 (幼儿园)
- 金币: 6094.7
- 散金: 155
- 红花: 3
- 帖子: 669
- 在线: 214.3小时
- 虫号: 538822
- 注册: 2008-04-03
- 专业: 凝聚态物性I:结构、力学和
2楼2008-11-21 22:34:10
wxjbuilder
木虫 (知名作家)
- 应助: 1 (幼儿园)
- 贵宾: 0.05
- 金币: 2986.4
- 散金: 1761
- 红花: 2
- 沙发: 1
- 帖子: 5392
- 在线: 273.2小时
- 虫号: 442356
- 注册: 2007-10-27
- 性别: GG
- 专业: 理论和计算化学

3楼2008-11-28 21:18:50
4楼2008-12-18 18:00:03
5楼2009-01-04 14:01:11












red(6),red(5),red(4),red(3),red(2),red(1) &
回复此楼