View Code of Problem 18

#include<iostream>
using namespace std;
int main()
{
	int n;
	while(cin>>n)
	{
		cout<<1+(n-2)*(n-3)/2<<endl;
	}
}

Double click to view unformatted code.


Back to problem 18