program
hitung;
var
A,B :
integer
;
op,sp :
char
;
begin
readln(A,sp,op,sp,B);
case
op
of
'*'
:
writeln
(A*B);
'+'
:
writeln
(A+B);
'-'
:
writeln
(A-B);
'<'
:
begin
if
A>B
then
writeln
(
'salah'
)
else
writeln
(
'benar'
);
end
;
'>'
:
begin
if
A>B
then
writeln
(
'benar'
)
else
writeln
(
'salah'
);
end
;
'='
:
begin
if
A=B
then
writeln
(
'benar'
)
else
writeln
(
'salah'
);
end
;
end
;
readln
end
.
Tidak ada komentar:
Posting Komentar