#include <iostream>
#include <vector>
#include <algorithm>
int main() {
using namespace std;
while(1) {
int sum = 0;
vector<int> arr;
cout << "Amount of numbers: ";
int N = 0;
cin >> N;
for(int i = 0; i<N; ++i) {
int temp = 0;
cout << "Num #" << i+1 << ": ";
cin >> temp;
arr.push_back(temp);
if(arr[i]%2!=0) {
sum+=arr[i];
}
cout << endl << "Sum of odd numbers: " << sum << endl << endl;
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
using namespace std;
while(1) {
int sum = 0;
vector<int> arr;
cout << "Amount of numbers: ";
int N = 0;
cin >> N;
for(int i = 0; i<N; ++i) {
int temp = 0;
cout << "Num #" << i+1 << ": ";
cin >> temp;
arr.push_back(temp);
if(arr[i]%2!=0) {
sum+=arr[i];
}
}
cout << endl << "Sum of odd numbers: " << sum << endl << endl;
}
}