Var A:integer; Begin WriteLn('Введи возраст'); Read(A); if (A>9)and(A<20) then WriteLn(A,' Лет') else Case A mod 10 of 1:Write(A,' Год '); 2..4:Write(A,' Года '); 0,5..9:Write(A,' Лет '); End End.
int main() { int n, s = 0; cin >> n; int a[n]; for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 0; i < n; s+=(a[i]*a[i]), i++); cout << s << endl; }