PDA

View Full Version : Small ClusterFuck



m3gaman3g3nd
01-11-2012, 07:27 AM
im reviewing all my basics again and not quite sure hot to write this
program new;

var
i, c, b: integer ;
begin
for i:= 1 to 4 do
inc(b) and inc(c); //error : fix
writeln(b+c)// supposed to equal 8

end.


edit.
found solution.
when using multiples you put begin

Dgby714
01-11-2012, 07:31 AM
Read a guide on standards! =P

program new;

var
i, c, b: integer;

begin
for i := 1 to 4 do
begin
Inc(b);
Inc(c);
end;

WriteLn(b + c);
end.

m3gaman3g3nd
01-11-2012, 07:34 AM
yeah i just figured it out but no im to cool for standards... basics are king