Double until it passes 100 · 100を超えるまで倍増させる
Double until it passes 100
n starts at 1. Keep doubling it while it is 100 or less. Store the first value over 100 in n.
Here the value being tested is the value being changed, so the loop needs no separate counter. It stops the moment the question turns false — and n keeps the value that made it false.
100を超えたら止める
n は 1 で始まります。100 以下である限り倍にします。100 を超えた最初の値を n に保存してください。
ここではテスト対象の値そのものが書き換えられるため、別のカウンタは必要ありません。条件が偽になった瞬間に停止し、n にはその偽にする値が保持されます。
n starts at 1. Keep doubling it while it is 100 or less. Store the first value over 100 in n. · n は 1 で始まります。100 以下である限り倍にします。100 を超えた最初の値を n に保存してください。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。