Напишите программу в паскале , которая зная секунды, за которые десятиклассник пробежал
2000 метров, а так же его пол, выставляет отметку по этой дисциплине.
Ответы
Ответ:
Объяснение:
var a,b,s,o:integer;
begin
o := 0;
writeln('введите количество секунд');
readln(a);
writeln('1.муж 2.жен');
readln(b);
s:=0;
if b = 1 then
begin
if (a <= 400) and (s=0) then
begin
o := 5;
s := s+1;
end;
if (a <= 500) and (s=0) then
begin
o := 4;
s := s+1;
end;
if (a <= 600) and (s=0) then
begin
o := 3;
s := s+1;
end;
if (a <= 700) and (s=0) then
begin
o := 2;
s := s+1;
end;
end
else
begin
if (a <= 500) and (s=0) then
begin
o := 5;
s := s+1;
end;
if (a <= 600) and (s=0) then
begin
o := 4;
s := s+1;
end;
if (a <= 700) and (s=0) then
begin
o := 3;
s := s+1;
end;
if (a <= 800) and (s=0) then
begin
o := 2;
s := s+1;
end;
end;
writeln('оценка: ',o)
end.
var a,b,s,o:integer;
begin
writeln('введите количество секунд');
readln(a);
writeln('1.муж 2.жен');
readln(b);
if b = 1 then
case A of
0..400: WriteLn('5');
401..500: WriteLn('4');
501..600: WriteLn('3');
else WriteLn('оценка 2');
end;
if b=2 then
case A of
0..500: WriteLn('5');
501..600: WriteLn('4');
601..700: WriteLn('3');
else WriteLn('оценка 2');
begin
end;
end;
end.
begin
writeln('введите количество секунд');
readln(a);
writeln('1.муж 2.жен');
readln(b);
if b = 1 then
case A of
0..400: WriteLn('5');
401..500: WriteLn('4');
501..600: WriteLn('3');
else WriteLn('оценка 2');
end;
if b=2 then
case A of
0..500: WriteLn('5');
501..600: WriteLn('4');
601..700: WriteLn('3');
else WriteLn('оценка 2');
begin
end;
end;
end.