Answers for "sum of vector int c++"

0

C++ sum a vector of digits

// Sum digits in vector
int digit_sum(vector<int> num) {
    int sum = 0;
    for (auto x : num) sum += x;
    return sum;
}
Posted by: Guest on April-21-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language