x3c2c5

Untitled

Jan 23rd, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.30 KB | None | 0 0
  1. #Test case for normal input:
  2.  
  3. int main() {
  4.     int n = 4;
  5.     int A[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
  6.     int row = 1;
  7.     // expected output: 1 2 3 4
  8.     //                  9 10 11 12
  9.     //                  5 6 7 8
  10.     //                  13 14 15 16
  11. }
  12.  
  13.  
  14. #Test case for edge input:
  15. int main() {
  16.     int n = 1;
  17.     int A[1][1] = {{1}};
  18.     int row = 0;
  19.     // expected output: 1
  20. }
  21.  
  22.  
  23.  
  24. #Test case for negative input:
  25. int main() {
  26.     int n = 3;
  27.     int A[3][3] = {{-1, -2, -3}, {-4, -5, -6}, {-7, -8, -9}};
  28.     int row = 2;
  29.     // expected output: -1 -2 -3
  30.     //                  -7 -8 -9
  31.     //                  -4 -5 -6
  32. }
  33.  
  34. #Test case for decimal input:
  35. int main() {
  36.     int n = 2;
  37.     int A[2][2] = {{1.5, 2.5}, {3.5, 4.5}};
  38.     int row = 1;
  39.     // expected output: 1.5 2.5
  40.     //                  3.5 4.5
  41. }
  42.  
  43. #Test case for large input:
  44. int main() {
  45.     int n = 5;
  46.     int A[5][5] = {{10, 20, 30, 40, 50}, {60, 70, 80, 90, 100}, {110, 120, 130, 140, 150}, {160, 170, 180, 190, 200}, {210, 220, 230, 240, 250}};
  47.     int row = 3;
  48.     // expected output: 10 20 30 40 50
  49.     //                  110 120 130 140 150
  50.     //                  60 70 80 90 100
  51.     //                  210 220 230 240 250
  52.     //                  160 170 180 190 200
  53. }
  54.  
Advertisement
Add Comment
Please, Sign In to add comment