#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int n;
cin >> n;
int a[n];
srand(time(0));
for(int i=0; i<n; i++)
a[i]=-99+rand()%199;
cout << setw(4) <<a[i];
}
cout << endl;
int j=n-1;
while(j>0)
int mx=a[0], imx=0;
for(int i=1; i<=j; i++)
if(a[i]>mx)
mx=a[i];
imx=i;
a[imx]=a[j];
a[j]=mx;
j--;
return 0;
var a,b,i:integer; s:longint;begin repeat write('Vvedite chisla a,b='); readln(a,b); until a<b; s:=0; for i:=a to b do inc(s,sqr(i)); writeln('Summa kvadratov=',s);end.
а) 7000байт
знаю только на первый.