Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long long c[107][107];
- long long a,b,i,w;
- int main()
- {
- cin >>a>>b;
- for(i=1;i<=a;i++){
- for(w=1;w<=b;w++)
- if(i==1 || w==1) c[i][w]=1;
- else c[i][w] = c[i-1][w]+a[i][w-1];
- }
- for(i=1; i<=a;i++){
- for(w=1;w<=b;w++)
- cout << c[i][w]<<" ";
- cout << " " <<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement