输出用*画出的正三角形:

class Hello2 {
    public static void main(String[] args) {
    for (int i = 1;i <= 4 ;i++)
    {
        for (int j = 1;j <= i ;j++)
        {
            System.out.print("*");
        }
        System.out.println();
    }
    }
}

结果:

循环嵌套输出用*画出的正三角形

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2021-04-15
猜你喜欢
  • 2022-01-17
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-09-18
  • 2021-07-02
  • 2021-10-17
相关资源
相似解决方案