Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.c
- // test
- //
- // Created by Ranhao on 2015/9/20.
- // Copyright (c) 2015年 Ranhao. All rights reserved.
- //
- #include <stdio.h>
- #include <stdlib.h>
- void traverse(int m, int n, int A[m][n])
- {
- int i,j;
- for(i=0; i<m; i++)
- {
- for(j=0;j<n;j++)
- {
- printf("%d ",A[i][j]);
- }
- printf("\n");
- }
- }
- int main(int argc, const char * argv[])
- {
- int A[2][3] = {
- {1,2,3},
- {2,5,5}
- };
- traverse(2,3,A);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment