I've got a problem with pascal. I'm learning it at school and because I already use Java, I'm a little bit confused. But that is not exactly why it doesn't work. I am trying to make a simple if (condition) write(this) else write(that) program, that runs in the cmd.
When I try to compile the following code, it says, I have to write a ; instead of else, but that just seems odd.
program Project1;
var max : integer;
var max2 : integer;
begin
writeln('Max: Oh no, I'm an integer');
writeln('Which integer is max supposed to be?');
readln (max);
writeln('Max: I don't want to be a', max);
writeln('Multiply Max');
readln (max2);
if (max = max * max2) then
writeln('NO, I do not want to be a', max);
else
writeln('I think I could live with being a ', max * max2);
readln;
end.