Play Journal Entries

Petit computer 3

ST.HMVそらまめnasyo36

10/20/2017 4:30 AM ·Spoilers

確率のせってい方法を誰か教えてください。

Advertisement

Comment

This post has no comments.

  • SOU

    10/20/2017 4:59 AM ·Spoilers

    0~9の数字を出す方法 変数=RND(10) PRINT 変数 こんな感じです。

    Yeahs0
    Played
  • 数字ではなく何回かに一度プログラムを開始すると言うのはできませんか

    Yeahs1
    Played
  • プログラムの先頭に IF RND(a)!=0 then end とおいてあげると、a分の1の確率で起動する! 的な感じになるんじゃないでしょうか…ヽ(´エ`)ノ

    Yeahs2
    Played
  • あ、aは適当な数字に置き換えて入力してみて下さいー!( ´∀`)

    Yeahs0
    Played
  • IF文って知ってるかい?

    Yeahs0
    Played
  • ○○%の確率で実行したいとかいうのであれば個人的にはRNDF()がオススメです。 例えばこれで72%の確率でTHEN以下を実行できます。 IF RNDF()<72/100 THEN ~ (0.12%とか小数を使ったものでもOK) 整数だけで良いならばツララさんと同じやり方ですが IF RNDF(100)<72 THEN ~ とするのが簡単です。

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-DPU-2NLA-JZU-GY4U

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: