⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multiplyloop2.java

📁 本java源程序包括了大量的学习程序(共27章)方便大家学习
💻 JAVA
字号:
class MultiplyLoop2 
{
	public static void main(String[] args) 
	{
        MultiplyLoop2 multiplyLoop2 = new MultiplyLoop2();
        multiplyLoop2.print(10);
	}
	public void print(int n)
	{
		int temp = 0;
		for(int i = 0; i < 2 * n - 1; i++)
		{
			if(i <= n)
				temp = i;
			else
				temp = 2 * n - 1 - i;
			for(int j = 0; j < temp; j++)
				System.out.print("*");
			System.out.println();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -