小编use*_*403的帖子

Gambler在Java中的废墟ASCII图

|  * |
| *  |
|  * |
| *  |
|  * |
| *  |
|  * |
|  * |
| *  |
| *  |
|  * |
| *  |
|*   |
Run Code Online (Sandbox Code Playgroud)

我需要为Gambler's Ruin问题打印类似上面的ASCII图.利益和目标被视为args.最左边的 代表0美元,最右边| 代表目标,*代表现金.我的计划如下:

  public class RuinPath {

  public static void main(String[] args) {
        // TODO - Your solution

    int stake = Integer.parseInt(args[0]);    // gambler's stating bankroll
    int goal = Integer.parseInt(args[1]);    // gambler's desired bankroll

    {
      int i = 0;
      if (i …
Run Code Online (Sandbox Code Playgroud)

java ascii

6
推荐指数
1
解决办法
691
查看次数

标签 统计

ascii ×1

java ×1