avr39ripe

cppArrSmallBigTemplate

Jul 12th, 2021
747
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3.  
  4. int main()
  5. {
  6.     const int arrSmallSize{ 5 };
  7.     const int arrBigSize{ arrSmallSize * 2 };
  8.  
  9.     int arrSmallA[arrSmallSize]{1,-4,-5,0,2};
  10.     int arrSmallB[arrSmallSize]{-5,0,7,4,-1};
  11.     int arrBig[arrBigSize]{}; //1 7 2 4 0 0 -4 -5 -5 -1
  12.  
  13.  
  14.     for (int i{ 0 }; i < arrSmallSize; ++i) { std::cout << arrSmallA[i] << '\t'; } std::cout << '\n';
  15.     for (int i{ 0 }; i < arrSmallSize; ++i) { std::cout << arrSmallB[i] << '\t'; } std::cout << '\n';
  16.  
  17.     for (int bigIdx{ 0 }; bigIdx < arrBigSize; ++bigIdx)
  18.     {
  19.  
  20.     }
  21.  
  22.     for (int bigIdx{ 0 }; bigIdx < arrBigSize; ++bigIdx) { std::cout << arrBig[bigIdx] << '\t'; } std::cout << '\n';
  23.  
  24.     return 0;
  25. }
RAW Paste Data