You are on page 1of 2

#include <iostream>

using namespace std;


int main()
{
int w,x,y,z;
cout<<"Please choose an
integer from 1 to
10:\n\n";
cin>>w;
cout<<endl;
if(w>=1&&w<=10)
{
for(x=0;x<l;x++)
{
for(y=0;y<=x;y++)
{
if (y==0||x==0)
z=1;
else
z=z*(x-y+1)/y;
cout<<z<<" ";
}

cout<<"\n";
}
}
else
cout<<"Invalid
Input\n\n";
system("pause");
return 0;
}

You might also like