Java 用for循环和while循环画菱形

...Java课的作业,没有用到什么算法
package edu.fjnu.Harry ;
/**
 * @author Harry
 *
 */
public class Demo_test2 {

	/**
	 * 编写Java程序,分别使用for循环和while循环打印菱形。
	 *		
	 */
	/**
	 * 此函数为用for循环打印菱形
	 * @param num
	 * @author Harry
	 */
	public static void forDiamond (int num) {
		for(int i = 1 ;i

你可能感兴趣的:(JavaCodeTra)