바보 문 딩보
른 문를 .
는 .
른 문를 .
는 .
#include <iostream>
using namespace std;
void printArray(int *arr, int n); // 는
void copyArray(int *fArr, int *arr); // 는
int column;
int main(){
cout << " (ex,6).";
cin >> column;
if(column > 0){
int *array = new int[column]; //는
int *foreArray = new int[column]; //()
for(int i = 0; i<column; i++){
array[0] = 1; // 1
for(int j = 1; j < column-1; j++){ //는 머리 는 2 를 더
array[j] = foreArray[j-1] + foreArray[j];
}
array[i] = 1; // 1
printArray(array, i); // 내 .
copyArray(foreArray, array); // 내 .
}
}
else
cout << "못 ."<< endl;
return 0;
}
void printArray(int *arr, int n){
int blank = (column - n)/2;
for(int j = 0;j < blank; j++){ // 빈
cout << " ";
}
for(int i = 0; i <= n; i++){ // 빈
cout << arr[i] << " ";
}
cout << endl;
}
void copyArray(int *fArr, int *arr){
for(int i = 0; i < column; i++){
fArr[i] = arr[i];
arr[i] = 0;
}
}










