kk258966

10/31 進階程式設計 練習一

Oct 31st, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. int main(void)
  5. {
  6.    
  7.    
  8.     int i,j;
  9.  int no[10][10];
  10. no[1][1]=25;
  11. no[1][2]=30;
  12. no[1][3]=35;
  13. no[1][4]=40;
  14. no[1][5]=45;
  15.  
  16. no[2][1]=5;
  17. no[2][2]=10;
  18. no[2][3]=15;
  19. no[2][4]=20;
  20. no[2][5]=25;
  21.  
  22. no[3][1]=1;
  23. no[3][2]=2;
  24. no[3][3]=3;
  25. no[3][4]=4;
  26. no[3][5]=5;
  27.  
  28. no[4][1]=6;
  29. no[4][2]=7;
  30. no[4][3]=8;
  31. no[4][4]=9;
  32. no[4][5]=10;
  33.  
  34.  
  35. for (i=1;i<=4;i++)
  36. {
  37.   for(j=1;j<=5;j++)
  38.   printf("%d, ",no[i][j]);
  39.   printf("\n===========================================\n");    
  40. }
  41.  
  42.  
  43.  
  44.  
  45.     system("pause");
  46.     return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment