Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- vector<double> fusio(const vector<double>& v1, const vector<double>& v2) {
- int count = 0, count2 = 0;
- bool v1fin = false, v2fin = false;
- vector<double> v(v1.size()+v2.size());
- while (count < v.size()) {
- if (not v1fin) {
- v[count] = v1[count2];
- ++count;
- }
- if (not v2fin) {
- v[count] = v2[count2];
- ++count;
- }
- ++count2;
- if (count2 == v1.size() and not v1fin) v1fin = true;
- if (count2 == v2.size() and not v2fin) v2fin = true;
- }
- return v;
- }
- int main () {
- }
Add Comment
Please, Sign In to add comment