int n;
cout << "Enter Input : ";
cin >> n;
for (int i = 0; i<n; i++)
{
for (int j = n - i; j>0; j--)
{
cout << " ";
}
int x = 1;
int num = i;
int den = 1;
for (int k = 0; k <= i; k++)
{
cout << x << " ";
x = x*num;
x = x / den;
num--;
den++;
}
cout << endl;
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น