Pascal. Написать алгоритм нахождения максимума из трех чисел (a,b,c) на языке Паскаль.

Pascal. Написать алгоритм нахождения максимума из трех чисел (a,b,c) на языке Паскаль.
Гость
Ответ(ы) на вопрос:
Гость
uses crt; var a,x,y,z:integer; begin Write ('x='); read (x); Write ('y='); read (y); Write ('z='); read (z); if x>y then a:=1 else a:=0; if (a=1) and (x>z) then write('x-bolwe'); if (a=0) and (xy) then a:=3; if (a=0) and (y>z)then write('y-bolwe'); if (a=3) then write('z-bolwe'); read; end.     находит большее из 3-х, ты ведь это имела ввиду)  
Гость
uses crt; var a, b , c: real; begin readln (a, b, c); if (a> b) and (a>c) then writeln (a, ' MAX'); if (b>a) and (b>c) then writeln (b, ' MAX'); if (c>a) and (c>b) then writeln (c, ' MAX'); if (c=a) and (c=b) then writeln ('VSE CHISLA RAVNI'); readkey; end.
Не нашли ответ?
Ответить на вопрос
Похожие вопросы