Công thức: if x>5 then writeln('x=a+b:2 lon hon 5') else
if x<5 then writeln('x=a+b:2 nho hon 5') else writeln('x=a+b:2 bang 5');
Áp dụng vào ct
uses crt;
var a,b,x:integer;
begin
clrscr;
write('Nhap a: ');readln(a);
write('Nhap b: ');readln(b);
x:=a+b/2;
if x>5 then writeln('x=a+b:2 lon hon 5') else
if x<5 then writeln('x=a+b:2 nho hon 5') else writeln('x=a+b:2 bang 5');
readln
end.