#include <iostream>
usingnamespace std;
int sum = 0;
int num;
int j;
int main()
{
for (j = 1; j <= 4; j++)
{
cin >> num;
if (num < 0)
continue; // If num isn't negative, it'll continue, which adds these numbers together
std::cout << "Number wasn't negative" << std::endl;
sum = sum + num;
}
cout << sum << endl;
}
You may run this code and try to figure out what the continue; does.