Guest User

Untitled

a guest
Apr 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5.  
  6. vector<double> fusio(const vector<double>& v1, const vector<double>& v2) {
  7.     int count = 0, count2 = 0;
  8.     bool v1fin = false, v2fin = false;
  9.     vector<double> v(v1.size()+v2.size());
  10.     while (count < v.size()) {
  11.         if (not v1fin) {
  12.             v[count] = v1[count2];
  13.             ++count;
  14.         }
  15.         if (not v2fin) {
  16.             v[count] = v2[count2];
  17.             ++count;
  18.         }
  19.         ++count2;
  20.         if (count2 == v1.size() and not v1fin) v1fin = true;
  21.         if (count2 == v2.size() and not v2fin) v2fin = true;
  22.     }
  23.     return v;
  24. }
  25.  
  26. int main () {
  27.  
  28. }
Add Comment
Please, Sign In to add comment