uses crt;
var s:string;
i:integer;n,x,z,a:real;
f:text;
begin
clrscr;
assign(f,'diem11a.txt');rewrite(f);
write('Nhap ten:');readln(s);
write('Nhap diem toan:');readln(n);
write('Nhap diem ly:');readln(a);
write('Nhap diem hoa:');readln(z);
x := n+a+z;
for i := 1 to length(s) do write(f,s[i]);
writeln(f);
write(f,n:4:2,#32#32#32);
write(f,a:4:2,#32#32#32);
write(f,z:4:2,#32#32#32);
write(f,x:4:2);
close(f);
readln
end.