program WhatOS;
{$APPTYPE CONSOLE}
uses
SysUtils;
const
GNU_LIBERTY_VALUE = 10;
var
input: string;
dummy: integer;
procedure Main();
begin
Writeln('');
Writeln('Ideal Operating System v1.0 (CopyRights 2007 DEC)');
Writeln('-------------------------------------------------');
Writeln('');
WriteLn('What is your liberty level? (0 to 10) Press S and ENTER to exit');
Writeln('');
while(input = '')do
begin
ReadLn(input);
input := Trim(input);
if(LowerCase(input) = 's') then
begin
Writeln('');
Writeln('');
Writeln('Have a good day!');
Sleep(2000);
Exit;
end;
if (Length(input) <= 2) and TryStrToInt(input, dummy) then
begin
if(dummy < 10) then
begin
Writeln('');
Writeln('OMG! Computing result... stay alive...');
Sleep(5000);
end;
Writeln('');
Writeln('');
if (dummy >= GNU_LIBERTY_VALUE) then
Writeln('Ok! Your ideal operating system is GNU/Linux')
else
Writeln('Ok! Your ideal operating system is Microsoft Windows');
Writeln('');
end
else
begin
Writeln('');
Writeln('Wrong input... try again...');
Writeln('');
input := '';
end;
end; Writeln('');
Writeln('Thanks for use this program. Press ENTER to exit');
ReadLn;
end;
begin
Main();
end.