/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
vector<int> ComputeAbs(vector<int> v){
vector<int> res;
for(int k : v)
res.push_back(k>=0? k: -k);
return res;
}
int main()
{
vector<int> input_data = {10, 20, -30, -50, 100};
for (int x : ComputeAbs(input_data)) {
// Операция ++ увеличивает значение целочисленной переменной на 1.
// Результатом операции ++ становится значение до увеличения.
cout << x << endl;
}
return 0;
}