如何用java的for循环做一个等腰三角形?

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/15 05:00:53

如何用java的for循环做一个等腰三角形?

要用三循环才可以,这个就是三角形的代码.
public class Test {
\x09public static void main(String[] args) {
\x09\x09for (int i = 1; i