ONLINE COMPILERS
LIBRARY
MANUAL PAGES & DOCS
CONTACT
Latest Users' Questions
User Submitted Question!
Name: Sasha
Title:
pascal in c
Question:
Title:
pascal in c
Question:
const
tip: set of char=['Л','л','Г','г'];
n=15;
type
ves=record
cena: integer;
teep : char;
end;
var
a: array[1..n] of ves;
i,k: byte;
s: real;
begin
s:=0; k:=0;
writeln('ВВЕДИТЕ ДАННЫЕ');
writeln('Легковой автомобиль обозначьте "л", грузовой - "г"');
for i:=1 to n do
begin
writeln(' ',i,'-й автомобиль:');
with a[i] do
begin
write(' цена: ');
readln(cena);
repeat
write(' тип (л, г): ');
readln(teep);
until teep in tip;
if teep in ['Л','л'] then
begin
s:=s cena;
inc(k);
end;
end;
end;
writeln('Средняя цена легвовых = ',s/k:0:2,' руб');
readln;
end.
tip: set of char=['Л','л','Г','г'];
n=15;
type
ves=record
cena: integer;
teep : char;
end;
var
a: array[1..n] of ves;
i,k: byte;
s: real;
begin
s:=0; k:=0;
writeln('ВВЕДИТЕ ДАННЫЕ');
writeln('Легковой автомобиль обозначьте "л", грузовой - "г"');
for i:=1 to n do
begin
writeln(' ',i,'-й автомобиль:');
with a[i] do
begin
write(' цена: ');
readln(cena);
repeat
write(' тип (л, г): ');
readln(teep);
until teep in tip;
if teep in ['Л','л'] then
begin
s:=s cena;
inc(k);
end;
end;
end;
writeln('Средняя цена легвовых = ',s/k:0:2,' руб');
readln;
end.
Name: pakkito tu negro sabroson
Name: dlasgjhgorhgoaier
Name: sasha gray
Name: Giuseppe Nicosia Carmelo Maria