Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

задание 2

Program prog;
uses crt;
var a,b,v:integer;

begin
clrscr;

write('Возраст Антона = ');
readln(a);
write('Возраст Бориса = ');
readln(b);
write('Возраст Виктора = ');
readln(v);
writeln;

if (a>b)and(a>v) then writeln('Антон старше всех.');
if (b>a)and(b>v) then writeln('Борис старше всех.');
if (v>a)and(v>b) then writeln('Виктор старше всех.');

if (a=b)and(a>v) then writeln('Антон и Борис старше Виктора');
if (a=v)and(a>b) then writeln('Антон и Виктор старше Бориса');
if (b=v)and(b>a) then writeln('Борис и Виктор старше Антона');

if (a=b)and(a=v) then writeln('Антон,Борис и Виктор одного возраста');
end.

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.