U E D R , A S I H C RSS

파스칼삼각형/조현태

..
... ~~
.. 밤늦 모르..ㅎㅎ
리면 ......ㅎㅎㅎㅎㅎ

// 변 ?^^*

~cpp 
#include <iostream>

using namespace std;

void main()
{
	int hang=0;
	int yol=1;
	while (hang<yol)
	{
		cout << "몇번  ?";
		cin >> hang;
		cout << "몇번  ?";
		cin >> yol;
	}
	if (yol==1) // 1 ,   1      ...  ;
		cout << " 1 .";
	else
	{
		int bun_ja=1;
		int bun_mo=1;
		for (register int i=0; i<yol-1; ++i)
		{
			bun_ja*=hang-1-i;
			bun_mo*=i+1;
		}
		cout << " " << bun_ja/bun_mo << ".";
	}
}

  • ~?
    .. ~~ ^^ ㅎ --
    └ㅎㅎ ..;; 0.. ..^^ -

  • ;; 돼는 -_-;; =0=;;;
    └ ㅎㅎㅎ ..ㅎㅎㅎ -
    -
    └;; ..;; 뭐 . 데..ㅎㅎ 데 변 뽀..ㅎㅎ -
    =_=;; ; .... 는데 =0=
    ? 리는 배는데.. nCr x^n y^(n-r).. 맞는 모르..ㅎㅎ -


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