Friday, May 13, 2011

18. ตัวอย่างคำสั่ง if-then-else (if-then-else Example)


program ifthenelse;
uses crt;
var num:Integer;
BEGIN
ClrScr;
write('Insert Number : ');
readln(num);
if num>=0 then
writeln('Number is Positive')
else
writeln('Number is Nagative');
readln;
END;

No comments:

Post a Comment