Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit e2a9eb9

Browse files
committed
Step 6 - Green
1 parent e6c7a7d commit e2a9eb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

add.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ int add(string numbers) {
2828
while (getline(ss, strg, '\n')) {
2929
stringstream lineStream(strg);
3030
while (getline(lineStream, num, delimeter)) {
31-
sum += stoi(num);
31+
if (stoi(num) <= 1000) {
32+
sum += stoi(num);
33+
}
3234
}
3335
}
3436
return sum;

0 commit comments

Comments
 (0)