SRL Archive - General

Small ClusterFuck


m3gaman3g3nd

2012-01-11 02:27:07

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

2012-01-11 02:31:08

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

2012-01-11 02:34:59

yeah i just figured it out but no im to cool for standards… basics are king