summaryrefslogtreecommitdiff
path: root/4p21.cpp
blob: 0be1faa641218fb0dedd23a217a12e913cc41518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>
#include <vector>

/*
 *
 * 4.21
 *
 *
 */

int main () {

	std::vector<int> odddouble = {1,34,53,11,2,35,442,90,100,23,20,33,10,40,20,50};
	for(auto a : odddouble) {
		std::cout << a << " ";
	}
	
	std::cout << std::endl;
	for(auto &a : odddouble) {
		a = a % 2 ? a * 2 : a ;
	}

	for(auto a : odddouble) {
		std::cout << a << " ";
	}
	
	std::cout << std::endl;
	return 0;
}