char[][] wjx={
{' ',' ',' ',' ','*','\r'},
{' ',' ',' ','*',' ','*','\r'},
{'*',' ','*',' ',' ',' ','*',' ','*','\r'},
{' ','*',' ',' ',' ',' ',' ','*','\r'},
{' ',' ','*',' ',' ',' ','*','\r'},
{' ','*',' ','*',' ','*',' ','*','\r'},
{'*',' ',' ',' ',' ',' ',' ',' ','*','\r'}
};
for(int i=0;i<7;i++){
for(int j=0;j
}
}
import java.util.Scanner;
public class a {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a,b,c,d,e;
System.out.println("请输入五角星的一边长:");
a = sc.nextInt();
if(a%3==1){
a += 2;
}
else if(a%3==2){
a += 1; }
for(b=1;b<=a/3;b++){
for(e=1;e<=a/3;e++){
System.out.print(" ");
}
for(d=a/3;d>=b+1;d--){
System.out.print(" ");
}
for(c=1;c<=b;c++){
System.out.print(" *");
}
System.out.println();
}
int h,i,j,k;
j = a;
for(h=1;h<=a/3;h++){
for(k=1;k<=h-1;k++){
System.out.print(" ");
}
for(i=j;i>=1;i--){
System.out.print(" *");
}
j --;
System.out.println();
}
int l,m,n,o,p,q;
n = a;
p = (n-a/3)/2+1;
q = (n-a/3)/2+1;
for(l=1;l<=a/3;l++){
for(o=a/3-1;o>=l;o--){
System.out.print(" ");
}
for(m=1;m<=n-a/3+1;m++){
if(m == q||m == p||(m>q&&m
System.out.print(" ");
}
else{
System.out.print(" *");
}
}
p += 2;
q--;
n++;
System.out.println();
}
}
}
int touHigh = 6;
int jianHigh = 25 ;
int kuang =50;
for (int i=1;i<=touHigh+jianHigh;i++){
for(int j =1;j<=kuang;j++){
//上三角
if (i<=touHigh) {
if(j>=(kuang/2+1)+1-i && j<=(kuang/2+1)-1+i){
System.out.print("*");
}else{
System.out.print("-");
}
}
//上三角一下部分
if (i>touHigh&&i<=jianHigh){
if(j>=(kuang/2+1)+1-i&&j<=kuang-3*(i-touHigh)){System.out.print("*");
}
else if(j<=(kuang/2+1)-1+i&&j>=0+3*(i-touHigh)){System.out.print("*");
}
else {System.out.print("-");
}
}
}
System.out.println("");
}