1

it gives me an error and the code is:

var a,b,c:integer;
begin
write('a=');readln(a);
write('b=');readln(b);
write('c=');readln(c);
if a>b then
begin
if a>c then
writeln('a=',a)
else
writeln('c=',c);
end;
else
begin
if b>c then
writeln('b=',b)
else
writeln('c=',c);
end;
readln;
end.

Edited by pritaeas: Added code tags.

3
Contributors
2
Replies
28
Views
4 Years
Discussion Span
Last Post by riki.kavadarci
0

12 end;
13 else
14 begin
Notvalid
end;
; Not valid

Valid code
....
Do something

**If *statement       

then begin

Here Code if statement satisfied
.....

End else begin

Here Code if statement not satisfied
.....

end;

// You must ending this cicle with end;

...
end.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.