바보같 문 고 딩다보
다른 문를 .
각 력는 드다.
다른 문를 .
각 력는 드다.
#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; } }