Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- long fat(int n);
- main()
- {int MAT[3][4], i, j;
- for (i=0; i<3; i++)
- {for (j=0; j<4; j++)
- {MAT[i][j]=(fat(i)+fat(j));}}
- for (i=0; i<3; i++) {
- for (j=0; j <4; j++) {
- printf("%d ", MAT[i][j]);
- }
- printf("\n");}
- }
- long fat (int n)
- {long a;
- if (n==0) a=1;
- else
- a= n * fat(n-1);
- return a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement