26-12-2013, 06:38 PM
الكود الاول
الكود الثاني
كود :
var
i:integer;
s:string;
begin
i:=1;
s:='a';
if s='a' then begin
if i > 2 then ShowMessage('true')
else ShowMessage('false');
end
else
if s='b' then begin
if i > 7 then ShowMessage('true')
else ShowMessage('false');
end
else
if s='c' then begin
if i > 20 then ShowMessage('true')
else ShowMessage('false');
end
else ShowMessage('errrrrrr');
end;كود :
var
i:integer;
s:string;
begin
i:=8;
s:='c';
if ( s='a' ) or (s='b' )or (s='c' ) then begin
if i > 20 then ShowMessage('true')
else
if ( s='c' ) then ShowMessage('false')
else
if i > 7 then ShowMessage('true')
else
if ( s='b' ) then ShowMessage('false')
else
if i > 2 then ShowMessage('true')
else ShowMessage('false') ;
end
else ShowMessage('rrrrrr');
