fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #define V (6)
  5. #define H (2)
  6.  
  7. int main(){
  8.  
  9. char *moji[V][H]={{"1","2"},{"3","4"},{"5","6"},{"7","8"},{"9","10"},{"11","12"}};
  10. int suuji[V][H];
  11. int i,j;
  12.  
  13. for(i=0;i<V;i++){
  14. for(j=0;j<H;j++){
  15. suuji[i][j] = atoi(moji[i][j]);
  16. }
  17. }
  18. for(i=0;i<V;i++){
  19. for(j=0;j<H;j++){
  20. printf("%d ",suuji[i][j] );
  21. }
  22. puts("");
  23.  
  24. }
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0.01s 1676KB
stdin
Standard input is empty
stdout
1 2 
3 4 
5 6 
7 8 
9 10 
11 12