Дан список путевок, содержащий следующие данные: Название курорта, страна, стоимость проживания, стоимость дороги. Вывести суммарную цену путевки — Pascal(Паскаль)

uses crt;
const n=1;
type rec=record
      name,coun:string;
      stp,std:integer;
     end;
var x:array[1..n] of rec;
    i:integer;
begin
ClrScr;
for i:=1 to n do
 with x[i] do
 begin
  Write(' Name: ');
  Readln(name);
  Write(' Country: ');
  Readln(coun);
  Writeln(' St.putevki: ');
  Readln(stp);
  Write(' St.dorogi: ');
  Readln(std);
 end;
Writeln('Table: ');
Writeln('----------------------------------------------');
Writeln('||  Name  | Country | St.put | St.dor | Sum ||');
Writeln('----------------------------------------------');
for i:=1 to n do
 Writeln('||',x[i].name:8,'|',x[i].coun:9,'|',x[i].stp:8,'|',x[i].std:8,
         '|',x[i].stp+x[i].std:5,'||');
Writeln('----------------------------------------------');
Readln;
end.

Leave a Comment

5 + = 11