Составьте программу используя, оператор if: Ввести года рождения 3 сестер: Аня, Оля и Лена. Определить младшую, среднюю и старшую.
Answers & Comments
0ri
Var godA, godO, godL,ctar:integer; begin wrietln("A");readln(godA); wrietln("O"); readln(godO); wrietln("L"); readln(godL); if (godA<godO) then ctar =godO else ctar = godA; if (ctar<godL) then write("Сред:",ctar," Стар:",godL ) else if(godA<godL) then write("Сред:",godL," Стар:",ctar) else write("Сред:",godA," Стар:",ctar); end;
Answers & Comments
begin
wrietln("A");readln(godA);
wrietln("O"); readln(godO);
wrietln("L"); readln(godL);
if (godA<godO) then ctar =godO else ctar = godA;
if (ctar<godL) then write("Сред:",ctar," Стар:",godL ) else
if(godA<godL) then write("Сред:",godL," Стар:",ctar) else
write("Сред:",godA," Стар:",ctar);
end;