what are "+=" and "-=" ?

can anyone tell me what does "+=" or "-="mean?

for example;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
int main()
{
	int start,end;
	cout << "Enter the boundaries( start, end): ";
	cin >> start >> end;
	
	double sum = 0;

	if (start > end)
		cout << "Start must be smaller than end!" << endl;
	else
	{
		while (start <= end)
		{
			sum += reciprocal(start);   //This one "+="
			start++;
		}
		cout << "Sum of reciprocals: " << sum << endl;
	}
	return 0;
}
Topic archived. No new replies allowed.