Results 1 to 3 of 3

Thread: Small ClusterFuck

  1. #1
    Join Date
    Jan 2012
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default Small ClusterFuck

    im reviewing all my basics again and not quite sure hot to write this
    Simba Code:
    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
    Last edited by m3gaman3g3nd; 01-11-2012 at 07:33 AM. Reason: solution

  2. #2
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Read a guide on standards! =P

    Simba Code:
    program new;

    var
      i, c, b: integer;

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

      WriteLn(b + c);
    end.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  3. #3
    Join Date
    Jan 2012
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •