您的位置:首页 > 其它

等腰三角形

2016-01-21 15:48 148 查看
package Day;

//练习 等腰三角形

public class Day2 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

for(int x=0;x<5;x++){

for(int y=x;y<5;y++){

System.out.print("-");
}
for(int z=0;z<=x;z++){
System.out.print("*");
}

System.out.println();

}
}


}

// —–*

// —-**

// —*

// –**

// -* 结果如此
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: