U E D R , A S I H C RSS

aekae/*

소스 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)

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:31:36
Processing time 0.0076 sec