#includevoid s(){ printf(" *\n "); printf(" ***\n"); printf(" *****\n"); printf(" *******\n");; printf(" *********\n"); printf(" ***********\n");}void l(){ printf(" *\n "); printf(" ***\n"); printf(" *****\n"); printf(" *******\n "); printf(" *****\n"); printf(" ***\n "); printf(" *\n ");}void p(){ printf(" ************ \n"); printf(" * * \n"); printf(" * * \n"); printf(" ************* \n");}void main(){ int a;while(1){ printf("1.输出三角形:\n"); printf("2.输出棱形:\n"); printf("3.输出平行四边形:\n"); printf("4.退出\n"); printf("请输入你的选择:\n"); scanf("%d",&a); if(a==1) s(); else if(a==2) l(); else if(a==3) p(); else if(a==4) break; else printf("输入有误");}}