#include <iostream> using namespace std; int PasNum(int col,int row){ int i=0; int result=1; for(i=0;i<row;i++){ result*=col; col--; } for(i=0;i<row;i++){ result/=row; row--; } return result; } void main(){ int col, row; cout<<"파스칼삼각형의 숫자 확인"<<endl; cout<<"행은?"; cin>>col; cout<<"열은?"; cin>>row; cout<<PasNum(col-1,row-1)<<endl; }