【初心者】課題をクリアしていくスレ【講習会】at GAMEDEV
【初心者】課題をクリアしていくスレ【講習会】 - 暇つぶし2ch299:HSPで素数
04/07/10 08:28 gc5EpECZ
#include "hspext.as"
False=0:True=1:count++:i=3
mes "計算中......"
while count<1000
    sosu=True
    j=3
    emsqr chk,i
    chk=chk>>4
    while j<=chk
        if (i \ j)=0 {
            sosu=False
            _break
        }
        j=j+2
    wend

    if sosu=True {
//        cls
//        mes i
        EndNum=i
        count++
    }
    i=i+2

    gettime NowTime, 6
    if (NowTime!=BeforeTime) {
        BeforeTime=NowTime
        wait 1
    }
wend
mes "計算終了。"+count+"個目の素数は"+EndNum+"です。"
stop mes


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch