var
n:real;
begin
readln (n);
n:=n*sqrt (2);
writeln (n);
end.
Фотку с решением не смог загрузить . Ответ : 6,8,10
b = (2468/100)*10=(68(остаток))*10
a = 2468/1000 + 680 = 2 + 680
a = 682 b = 680
ответ: в
#include <iostream>
<span>#include <ctime>
</span><span>using namespace std;
</span>int main() {
<span> int n,m;
</span><span> FILE *fpt;
</span><span> cout<<"n = "; cin>>n;
</span><span> fpt=fopen("input.dat","wb");
</span><span> srand(time(NULL));
</span><span>// запись файла
</span><span> for (int i=0; i<n; i++) {
</span><span> m=rand()%8000-3000;
</span><span> cout<<m<<" ";
</span><span> fwrite(&m,sizeof(int),1,fpt);
</span><span> }
</span><span> cout<<endl;
</span><span> fclose(fpt);
</span><span> fpt=fopen("input.dat","rb+");
</span><span> int indf=0,indl=0,vf=0,vl=0,k=0;
</span><span>// чтение файла
</span><span> while (fread(&m,sizeof(int),1,fpt)!=0) {
</span><span> k++;
</span><span> if (!(m%2==0) && (indf==0)) { indf=k-1; vf=m; }
</span><span> if ((!m==0) && (m%2==0)) { indl=k-1; vl=m; }
</span><span> }
</span><span> cout<<"first odd = "<<vf<<" index = "<<indf<<endl;
</span><span> cout<<"last even = "<<vl<<" index = "<<indl<<endl;
</span><span>// обмен первого нечетного и последнего четного
</span><span> if (indf>0) {
</span><span> fseek(fpt,sizeof(int)*indf,SEEK_SET);
</span><span> fwrite(&vl,sizeof(int),1,fpt);
</span><span> }
</span><span> if (indl>0) {
</span><span> fseek(fpt,sizeof(int)*indl,SEEK_SET);
</span><span> fwrite(&vf,sizeof(int),1,fpt);
</span><span> }
</span><span> fclose(fpt);
</span><span> system("pause");
</span><span> return 0;
</span><span>}
</span>n = 6
<span>4368 2733 1112 2620 1941 753
</span><span>first odd = 2733 index = 1
</span><span>last even = 2620 index = 3
</span>