Uses crt;var ADR:array[1..10] of string; sub:array[1..10] of string; i,k:integer; s:string; begin; for i:=1 to 10 do begin; writeln('Input town of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s+' '; writeln('Input street of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s+' '; writeln('Input house of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s+' '; writeln('Input apartament of ',i,'student'); readln(s); ADR[i]:=ADR[i]+s; if pos('Краснодар',ADR[i])<>0 then begin; inc(k); sub[k]:=ADR[i]; end; end; TextColor(4); writeln('Result:'); for i:=1 to k do writeln(sub[i]); end.
//Поэтому интерпретировал как "любые 10 дней"
#include <iostream>
#include <stdlib.h>
#include <ctime>
using namespace std;
int main() {
srand(time(0));
int ar[30];
int max=0;
int ar2[21];
int is,iv;
cout<<"Mounth \n";
for(int i=0;i<30;i++){
ar[i]=rand()%100+1;
cout<<ar[i]<<" ";
}
for(int i=0;i<21;i++){ ar2[i]=ar[i]+ar[i+1]+ar[i+2]+ar[i+3]+ar[i+4]+ar[i+5]+ar[i+6]+ar[i+7]+ar[i+8]+ar[i+9]; //не влезло
if(max<ar2[i]){
max=ar2[i];
is=i+1;
iv=i+10;
}
}
cout<<"\n"<<is<<"-"<<iv;
cin.get();
cin.get();
return 0;
}
sub:array[1..10] of string;
i,k:integer;
s:string;
begin;
for i:=1 to 10 do
begin;
writeln('Input town of ',i,'student');
readln(s);
ADR[i]:=ADR[i]+s+' ';
writeln('Input street of ',i,'student');
readln(s);
ADR[i]:=ADR[i]+s+' ';
writeln('Input house of ',i,'student');
readln(s);
ADR[i]:=ADR[i]+s+' ';
writeln('Input apartament of ',i,'student');
readln(s);
ADR[i]:=ADR[i]+s;
if pos('Краснодар',ADR[i])<>0 then
begin;
inc(k);
sub[k]:=ADR[i];
end;
end;
TextColor(4);
writeln('Result:');
for i:=1 to k do
writeln(sub[i]);
end.