我来试试 一下是大致框架int i (define how many row you want to print)
int j define the start position , the initiatial position is 0
for (i=0;i<10;i++)
{
j=i;
for (int j;j<10;j++ )
print *;
change to new line;另外你的问题不是JAVA问题 任何语言都可以写
}
int j define the start position , the initiatial position is 0
for (i=0;i<10;i++)
{
j=i;
for (int j;j<10;j++ )
print *;
change to new line;另外你的问题不是JAVA问题 任何语言都可以写
}
int j define the start position , the initiatial position is 0
for (i=0;i<10;i++)
{
j=i;
for (j;j<10;j++ )
print *;
change to new line;
public class z
{public static void main(String args[])
{n:
for(int i=1;i<=10;i++)
{System.out.println();
for(int j=10;j>=1;j--)
{if(j<i)
continue n;
System.out.print('*');
}
}
}
}
public static void main(String[] args){
for(int i=10;i>0;i--){
for (int j=0; j < 10-i; j++) {
System.out.print(" ");
}
for(int o=i;o>0;o--){
System.out.print("*");
}
System.out.print("\n");
}
}
}
THE RESULT:
**********
*********
********
*******
******
*****
****
***
**
*