// PascalABC.NET
begin
var s := 0;
for var i := 1 to 13 do
s += ReadInteger;
s.Print
end.
program raf105;
const
n = 5;
var
a:array[1..n] of integer;
x, counter, i: integer;
begin
writeln('Заполните массив:');
for i:=1 to n do
readln(a[i]);
write('Введите значение элемента, который нужно удалить: ');
readln(x);
for i:=1 to n do
begin
if counter > 0
then a[i-counter]:= a[i];
if (a[i] = x) and (counter < 1)
then counter:= counter + 1;
end;
writeln('Вывод:');
for i:=1 to n-counter do
writeln(a[i]);
end.
2.program raf105;
const
n = 5;
var
a:array[1..n] of integer;
x, counter, i: integer;
begin
writeln('Заполните массив:');
for i:=1 to n do
readln(a[i]);
write('Введите значение элемента, который нужно удалить: ');
readln(x);
for i:=1 to n do
begin
if counter > 0
then a[i-counter]:= a[i];
if a[i] = x
then counter:= counter + 1;
end;
writeln('Вывод:');
for i:=1 to n-counter do
writeln(a[i]);
end.
Язык PascalABC
#include <iostream>
#include <cmath>
#include <set>
#include <vector>
#include <algorithm>
#pragma GCC optimize("Ofast")
using ll = long long;
using ld = long double;
using namespace std;
ll a[13];
void solve(){
ll sum = 0;
for(auto i: a)
sum += i;
cout << sum;
}
signed main() {
for(ll i = 0; i < 13; i++)
cin >> a[i];
solve();
}