Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
257 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int n,a=0,s=0;
	cin >> n;
	int mas[100];
	for (int i = 0; i < n; i++)
	{
		a += 2;
		mas[i] = a;
		s += a;
	}
	for (int i = 0; i < n; i++)
	{
		cout << mas[i] << "\n";
	}
	cout << s;
}