int positive_sum(int a[], int size) {
unsigned long long sum = 0;
for(int i = 0; i < size; ++i)
if(a[i] > 0)
sum += a[i];
return sum;
}
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
int positive_sum(int a[], int size) {
unsigned long long sum = 0;
for(int i = 0; i < size; ++i)
if(a[i] > 0)
sum += a[i];
return sum;
}