์์ค Code ¶
~cpp
#include <iostream>
using namespace std;
int main()
{
int i;
int a,b,c,d;
for (i=1; i<11; i++)
{
for (a=1; a<1+i; a++)
cout << "*";
for (b=1; b<12-i; b++)
cout << " ";
for (c=1; c<12-i; c++)
cout << "*";
for (d=1; d<2*i; d++)
cout << " ";
for (c=1; c<12-i; c++)
cout << "*";
for (b=1; b<12-i; b++)
cout << " ";
for (a=1; a<1+i; a++)
cout << "*";
cout << endl;
}
return 0;
}
ํ๊ณ ์ถ์๋ง ¶
ํ์ ํ์ง๋ง;; ์ค๋ณต๋๋ for๋ฌธ์ด ์๋๋ฐ ๊ทธ๊ฑธ ์ด์ฐ ์ฒ๋ฆฌํด์ผํ๋์ง ๋ชจ๋ฅด๊ฒ ๋ค์. ๋ด๊ณต์ ๋ ์์์ผ์ง. -- aekae
์ฌ์ ์ ๊ตฟ์ท. ๊ทผ๋ฐ ์ ๋ง๋ก For ๋ฌธ์ด ๋ ๋ง๋ค. - ์ฅ์ฐฝ์ฌ
์ค~ ์ํ๋๋ฐ? ์ด์ ๋๋ฉด For ๋ฌธ์ ์๋ฒฝํ๊ฒ ์ดํดํ๋ค๊ณ ๋ด๋ ๋๊ฒ ๋๊ฑธ?? ^^; - ์์ฑ(whiteblue)










