на С++ как то так
#include<iostream>
#include<ctime>
using namespace std;
int main(){
srand(time(NULL));
int N, a, sum = 0, ten = 10, index = 0;
int *arr;
cout << "enter size of arr(enter N) : ";
cin >> N;
arr = new int [N];
for(int i = 1; i <= N;i++)
arr[i] = rand()%25;
cout << "arr : " << endl;
for(int i = 1; i <= N;i++)
cout << arr[i] << " " ;
cout << endl;
cout << "enter a : " ;
cin >> a;
for(int i = 1; i <= N;i++)
{
if(arr[i] == a)
index = i;
}
if(index != 0)
{
for(int i = index + 1; i <= N;i++)
sum = sum + arr[i];
}
if(sum == 0)
cout << "Result = " << ten << endl;
else
cout << "Result = " << sum << endl;
}
var x:integer;
begin
read (x);
if (x=12) or (x=1) or (x=2) then writeln ('Зима');
if (x=3) or (x=4) or (x=5) then writeln ('Весна');
if (x=6) or (x=7) or (x=8) then writeln ('Лето');
if (x=9) or (x=10) or (x=11) then writeln ('Осень');
end.
2)
var K,a:integer;
begin
readln(K);
a:=K mod 10;
if (K=11) or(K=12) or (K=13) or (K=14) then writeln ('У меня ',K,' друзей') else
begin
if (a=1) then writeln ('У меня ',K,' друг');
if (a=0) or ((a>=5) and (a<=9)) then writeln ('У меня ',K,' друзей');
if (a>=2) and (a<=4) then writeln ('У меня ',K,' друга');
end;
end.