Во-первых в начале НЕ сin << sys, а сin >> s;
Во-вторых ты объявил/а все переменные в первом ифе, а значит в других функциях они уже не видны, поэтому стоит их объявить глобально
В-третьих переменная g не используется, поэтому можно ее и не объявлять
Вот код:
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int sys;
float a, b, c, d, e, sum, mid, pi=3.14, r;
cout << "if you would midle write-1, if place of circle-2" << endl;
cin >> sys;
if(sys == 1) {
cout << "input first midle" << endl;
cin >> a;
cout << "inpur second midle" << endl;
cin >> b;
cout << "input third midle" << endl;
cin >> c;
cout << "input thord midle" << endl;
cin >> d;
cout << "input fived midle" << endl;
cin >> e;
sum = a + b + c + d + e;
mid = sum / 5;
cout << "your midle: ";
cout << mid;
}
else{
if(sys == 2) {
cout << "this is the circle area formula S=pi*r^2" << endl;
cout << "input radius(r)" << endl;
cin >> r;
cout << pi * r * r;
}
}
return 0;
}
Program Denisqaa;
uses crt;
const mas2:array[1..10] of integer=(-7, 89, 64, -43, 4, 6, 8, -12, 55, 99);
var
res: array[1..10] of integer;
i,sum:integer;
begin
writeln('++');
writeln('| ПРОГРАММА Denisqaa |');
writeln('++');
writeln('| Исходный массив | Новый массив |');
writeln('++');
sum:=0;
for i:=1 to 10 do
begin
if mas2[i]<0 then res[i]:=mas2[i]*2;
if mas2[i]>0 then res[i]:=mas2[i]*mas2[i];
if mas2[i]=0 then res[i]:=mas2[i];
sum:=sum+res[i];
writeln('| ',mas2[i]:8,' | ',res[i]:8,' | ');
writeln('++');
end;
writeln();
writeln('Сумма элементов нового массива ',sum)
end.