Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
186 B
2
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
	int n, sum = 0;
	cin >> n;
	for (int i = 1; i <= n; ++i) { 
		sum += i; 
	}
	cout << (double)sum / n;

	return 0;

}