#include"iostream"#include"iomanip"using namespace std;int f(int i,int n){ if(i==1||i==n) return 1; else return f(i-1,n-1)+f(i,n-1); return 0;}void main(){ int n; cout<<"打印杨辉三角前n行:"; cin>>n; for(int i=1;i<=n;i++){ for(int m=n-1;m>=i;m--) { cout<<" "; } for(int j=1;j<=i;j++) { cout<<