…
include [HTML_REMOVED]
using namespace std;
int main()
{
int a, n;
cin >> a >> n;
if (n <= 0)
{
while (n <= 0)
{
cin >> n;
}
}
int sum = 0;
for (int i = a ; i <a + n; i++) {
sum += i;
}
cout << sum;
return 0;
}
…