Iv'e just started with Pascal and I'm doing some easy simple programs. Iv'e got some C++ experience, so for this problem I decided to use if/then/else in a way that seems logical to me.
Only thing is, when I type a number larger than 32767, the program doesn't produce the correct output.
Can somebody plz help me out?
Write('Enter an integer: ');
if InputInteger <= 32767 then WriteLn('Integer is: ', InputInteger);
if InputInteger > 32767 then WriteLn('Invalid integer!, try again');