K
Khách

Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

const fi='bt.txt';

fo='kt.txt';

var f1,f2:text;

a,b,c,tbc:real;

begin

assign(f1,fi); reset(f1);

assign(f2,fo); rewrite(f2);

readln(f1,a,b,c);

tbc:=(a+b+c)/3;

writeln(f2,tbc:4:2);

close(f1);

close(f2);

end.

24 tháng 4 2020

Program hotrotinhoc_hoc24;

const fi='BT.TXT';

fo='KQ.TXT';

var f: text;

x,y,z: integer;

t: longint;

procedure ip;

begin

assign(f,fi);

reset(f);

read(f,x,y,z);

close(f);

end;

procedure out;

begin

assign(f,fo);

rewrite(f);

t:=x+y+z;

write(f,t);

close(f);

end;

begin

ip;

out;

end.

uses crt;

const fi='so.inp';

var f1:text;

a,b:integer;

begin

clrscr;

assign(f1,fi); reset(f1);

while not eof(f1) do 

 begin

readln(f1,a,b);

writeln((a+b)/2:4:2);

end;

close(f1);

readln;

end.

const fi='dulieu.txt';

fo='ketqua.txt';

var f1,f2:text;

a,b:array[1..100]of integer;

n,i:integer;

begin

assign(f1,fi); reset(f1);

assign(f2,fo); rewrite(f2);

n:=0;

while not eof(f1) do

begin

n:=n+1;

readln(f1,a[n],b[n]);

end;

for i:=1 to n do 

begin

if (a[i]<b[i]) then writeln(f2,a[i])

else writeln(f2,b[i]);

end;

close(f1);

close(f2);

end.

const fi='kt.txt';

fo='kq.out';

var f1,f2:text;

s:string;

i,dem,d:integer;

begin

assign(f1,fi); reset(f1);

assign(f2,fo); rewrite(f2);

readln(f1,s);

vt:=pos('anh',s);

while vt<>0 do

begin

delete(s,vt,3);

insert(s,vt,'em');

vt:=pos('anh',s);

end;

writeln(f2,s);

close(f1);

close(f2);

end.

uses crt;

const fi='input.txt';

fo='output.txt';

var f1,f2:text;

a,b:integer;

begin

assign(f1,fi); reset(f1);

assign(f2,fo); rewrite(f2);

readln(f1,a,b);

if (a=0) and (b=0) then writeln(f2,'Phuong trinh co vo so nghiem');

if (a<>0) then writeln(f2,-b/a:4:2);

if (a=0) and (b<>0) then writeln(f2,'Phuong trinh vo nghiem');

close(f1);

close(f2);

end.

#include <bits/stdc++.h>

using namespace std;

long long a,b;

double tb;

int main()

{

freopen("dulieu.inp","r",stdin);

freopen("ketqua.out","w",stdout);

cin>>a>>b;

cout<<a<<" "<<b;

cout<<fixed<<setprecision(2)<<(a*1.0+b*1.0)/(2*1.0);

return 0;

}