#include<iostream>
#include<iomanip>
using namespace std;
int fab( int ,int ) ;
int main( ) {
int N,;
cout << "請輸入你要輸入的整數個數:" ;
cin >> N;
int x[ N] [ N] ;
for ( int i= 0 ; i< N; i++ ) {
cout << "請輸入整數:" << endl;
cin >> x[ 0 ] [ i] ;
}
for ( int i= 1 ,k= N- 1 ; i< N; i++ ,k-- ) {
for ( int j= 0 ; j< k; j++ ) {
x[ i] [ j] = fab( x[ i- 1 ] [ j] ,x[ i- 1 ] [ j+ 1 ] ) ;
}
}
for ( int i= 0 ,k= N; i< N; i++ ,k-- ) {
for ( int j= 0 ; j< k; j++ ) {
cout << x[ i] [ j] << " " ;
}
cout << endl;
}
cout << endl;
for ( int i= N- 1 ,k= 1 ; i>= 0 ; i-- ,k++ ) {
for ( int j= 0 ; j< k; j++ ) {
cout << setw( 2 ) << x[ i] [ j] << " " ;
}
cout << endl;
}
system ( "pause" ) ;
return 0 ;
}
int fab( int a,in
I2luY2x1ZGU8aW9zdHJlYW0+CgojaW5jbHVkZTxpb21hbmlwPgoKCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKCgppbnQgZmFiKGludCxpbnQpOwoKCgppbnQgbWFpbigpewoKCgogICAgaW50IE4sOwoKICAgIGNvdXQ8PCLoq4vovLjlhaXkvaDopoHovLjlhaXnmoTmlbTmlbjlgIvmlbg6IjsKCiAgICBjaW4+Pk47CgogICAKCiAgICAKCiAgICBpbnQgeFtOXVtOXTsKCiAgICAKCiAgICBmb3IoaW50IGk9MDtpPE47aSsrKXsKCiAgICBjb3V0PDwi6KuL6Ly45YWl5pW05pW4OiI8PGVuZGw7CgogICAgIGNpbj4+eFswXVtpXTsKCiAgICAgICAgICAgICAgIH0KCiAgICAKCiAgICBmb3IoaW50IGk9MSxrPU4tMTtpPE47aSsrLGstLSl7CgogICAgICBmb3IoaW50IGo9MDtqPGs7aisrKXsKCiAgICAgICAgICAgICAgCgogICAgICAgICB4W2ldW2pdPWZhYih4W2ktMV1bal0seFtpLTFdW2orMV0pOyAgICAgCgogICAgICAgICAgICAgICAgICAgCgogICAgICAgICAgICAgIH0gICAgICAKCiAgICAgICAgICAgIH0gICAgIAoKICAgICAgICAgICAgICAgCgogICAgICBmb3IoaW50IGk9MCxrPU47aTxOO2krKyxrLS0pewoKICAgICAgIGZvcihpbnQgaj0wO2o8aztqKyspewoKICAgICAgICAgICAgCgogICAgICAgICAgICBjb3V0PDx4W2ldW2pdPDwiICI7CgogICAgICAgICAgICAKCiAgICAgICAgICAgIAoKICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgIGNvdXQ8PGVuZGw7CgogICAgICAgICAgICB9CgogICAgICAKCiAgICAgIGNvdXQ8PGVuZGw7CgogICAgICAKCiAgICAgIGZvcihpbnQgaT1OLTEsaz0xO2k+PTA7aS0tLGsrKyl7CgogICAgICAgZm9yKGludCBqPTA7ajxrO2orKyl7CgogICAgICAgICAgICAgICAgICAgCgogICAgICAgICAgICBjb3V0PDxzZXR3KDIpPDx4W2ldW2pdPDwiICI7CgogICAgICAgICAgICAgICAgICAKCiAgICAgICAgIH0KCiAgICAgICAgICAgIGNvdXQ8PGVuZGw7CgogICAgICAgICAgIH0KCgoKICAgIHN5c3RlbSgicGF1c2UiKTsKCiAgICByZXR1cm4gMDsKCgoKfQoKCgoKCmludCBmYWIoaW50IGEsaW4=
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:19:11: error: expected unqualified-id before ‘;’ token
prog.cpp:101:19: error: ‘system’ was not declared in this scope
prog.cpp: At global scope:
prog.cpp:113:15: error: ‘in’ has not been declared
prog.cpp:113:15: error: expected ‘,’ or ‘...’ at end of input
prog.cpp:113:15: error: expected ‘)’ at end of input
prog.cpp:113:15: error: expected initializer at end of input
stdout