package sushu1;
import java.util.*;
public class tongji {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
System.out.println("welcome:");
int []a=new int[100];
for(int i=1;i<100;i++)
{
a[i]=i*2-1;
}
tm:while(true)
{
System.out.println("请输入一个证书:1:输出等腰三角形"+"\n 2:输出菱形\n"+"0:退出");
int choice=sc.nextInt();
switch(choice)
{
case 1:
int i,k=4;
for( i=1,k=4;i<=5;i++,k--)
{
int m=a[i];
int j=k;
while(j>0)
{
System.out.print(" ");
j--;
}
while(m>0)
{
System.out.print("*");
m--;
}
System.out.print("\n");
}
break;
case 2:
for( i=1,k=3;i<=4;i++,k--)
{
int j=k;
while(j>0)
{
System.out.print(" ");
j--;
}
int sum=4;
while(sum>0)
{
System.out.print("*");
sum--;
}
System.out.print("\n");
}
break;
case 0:
break tm;
}
}
return ;
}
}