P.S. Благодарность и лучший ответ не помешает.
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int i,n;
cout<<"Vvedite n: ";
cin>>n;
int a[n];
for (i=0; i<n; i++){
cout<<"Vvedite "<<i+1<<"-e chislo massiva: ";
cin>>a[i];
}
int d=a[1]-a[0];
i=1;
int f=0;
while (i<n-1 && f==0)
{ if (a[i+1]!=(a[i]+d)) f=1; i++; }
if (f==0) cout<<"Proggressia\n"; else cout<<"Ne progressia\n";
cin>>n; //чтобы окно не закрывалось
return 0;
}
N:=0;
for i:=1 to 50 do begin
write('x[',i,']='); readln(x);
if x<0 then N:=N+1;
end;
writeln('N=',N);
Блок-схема расчета площади квадрата
в приложении.