Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void IspisiTablearno (int niz[3][3]) {
- int i,j;
- for (i=0; i<3; i++) {
- for (j=0; j<3; j++)
- printf("%3d",niz[i][j]);
- printf("\n");
- }
- }
- void IspisiPokazivacima (int * niz,int m, int n) {
- int i,j;
- for (i=0; i<m; i++)
- {
- int *pok=niz;
- for (j=0; j<m; j++)
- printf("%3d",*pok++);
- printf("\n");
- niz++;
- }
- }
- int main () {
- int mat[3][3]={1,2,3,4,5,6,7,8,9};
- printf("Matrica: \n");
- IspisiTablearno(mat);
- printf("\nSa pokazivacima: \n");
- IspisiPokazivacima(mat,3,3);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement