제 나름대로 이렇게 바꿔봤습니다만...
에러가나오네요~~
#include <iostream.h>
int main()
{
int count,i,j;
cout << "Enter Line Length: ";
cin >> count;
int space = count / 2;
int i=0;
while(i<=space)
{
int j=0;
while(j<space-i)
{
cout<<"";
while(j<2*i+1)
{
cout<<"*";
j++;
}
j++;}
i++;
}
int i=1;
while(i<=space)
{
int j=1;
while(j<=i)
{
cout<<"";
int j=2*(space-i)+1;
while(j>=1)
{
cout<<"*";
j--;
}
j++;
}
i++;
}
return 0;
}
|