Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
206 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int a, b, d = 0, e = 0;
	cin >> a >> b;
	for (int i = a; i <= b; i++) {
		if (i % 2 == 0) {
			d += i;
			e += 1;
		}
	}
	cout << d / e;
}