标签:main void ati new inpu sum nbsp put public
正三角
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.print("请输入行数:");
int sum=input.nextInt();
for(int i=0;i<sum;i++){
for(int a=0;a<=i;a++){
System.out.print("☆");
}
System.out.println();
}
}
}
倒三角
标签:main void ati new inpu sum nbsp put public
原文地址:http://www.cnblogs.com/IT-Goofy/p/7219174.html