fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int t[2][5];
  5.  
  6. t[1][2] = 0;
  7.  
  8. t[0][0] = 0; t[0][1] = 0; t[0][2] = 0; t[0][3] = 0; t[0][4] = 0;
  9. t[1][0] = 0; t[1][1] = 0; t[1][2] = 0; t[1][3] = 0; t[1][4] = 0;
  10.  
  11. for (int r = 0; r < 2; ++r) {
  12. for (int c = 0; c < 5; ++c) {
  13. t[r][c] = 0;
  14. }
  15. }
  16.  
  17. for (int r = 0; r < 2; ++r) {
  18. for (int c = 0; c < 5; ++c) {
  19. scanf("%d", &t[r][c]);
  20. }
  21. }
  22.  
  23. int min = t[0][0];
  24. for (int r = 0; r < 2; ++r) {
  25. for (int c = 0; c < 5; ++c) {
  26. if (t[r][c] < min) {
  27. min = t[r][c];
  28. }
  29. }
  30. }
  31. printf("%d\n", min);
  32.  
  33. printf("%d %d %d %d %d\n", t[0][0], t[0][1], t[0][2], t[0][3], t[0][4]);
  34.  
  35. int total = t[0][3] + t[1][3];
  36. printf("%d\n", total);
  37.  
  38. printf("\t0\t1\t2\t3\t4\n");
  39. for (int r = 0; r < 2; ++r) {
  40. printf("%d\t", r);
  41. for (int c = 0; c < 5; ++c) {
  42. printf("%d\t", t[r][c]);
  43. }
  44. printf("\n");
  45. }
  46.  
  47. return 0;
  48. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
0
0 0 0 0 0
0
	0	1	2	3	4
0	0	0	0	0	0	
1	0	0	0	0	0