Mam program do porównywania 3 liczb lecz nie działa:(
uses crt;
var
a,b,c:integer;
begin
clrscr;
writeln('Podaj trzy liczby');
readln(a,b,c);
if a
writeln('a,b,c')
else if a
writeln('a,c,b')
else if b
writeln('b,a,c')
else if b
writeln('b,c,a')
else if c
writeln('c,a,b')
else if c
writeln('c,b,a');
readln;
end.[/code]
Mam taki problem ze wyskakuje mi błąd
[code]Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386 Copyright © 1993-2009 by Florian Klaempfl Target OS: Linux for i386 Compiling liczby.pas liczby.pas(11,13) Error: Incompatible types: got “Boolean” expected “LongInt” liczby.pas(13,18) Error: Incompatible types: got “Boolean” expected “LongInt” liczby.pas(15,18) Error: Incompatible types: got “Boolean” expected “LongInt” liczby.pas(17,18) Error: Incompatible types: got “Boolean” expected “LongInt” liczby.pas(19,18) Error: Incompatible types: got “Boolean” expected “LongInt” liczby.pas(21,18) Error: Incompatible types: got “Boolean” expected “LongInt” liczby.pas(25) Fatal: There were 6 errors compiling module, stopping Fatal: Compilation aborted Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
Kod wygląda na 100% dobry a wyskakuje taki dziwny error… Co jest nie tak?