No older revisions available
No older revisions available
~cpp
#include <stdio.h>
main()
{
int column,row, star,a;
char pattern;
printf("패턴입력:");
scanf("%c",&pattern);
printf("변의 길이 입력:");
scanf("%d",&a);
for(row=1; row<=a ; row=row+1)
{
for (column=a ; column > row ; column=column-1)
{
printf(" ");
}
for(star=0;star<2*column-1;star=star+1)
{
printf("*");
}
printf("\n");
}
for (row=1;row<=a;row=row+1) {
for(column=1;column<=row;column=column+1){
printf(" ");
}
for (star=0;star<2*a-2*column+1;star=star+1) {
printf("*");
}
printf("\n");
}