Please look at EVERY part, or at least try!

Discussion in 'Free Thoughts' started by All, Jul 20, 2020.

Thread Status:
Not open for further replies.
  1. All Registered Member

    Messages:
    2
    Dim I(24)

    For a=1 to 10

    For b=1 to 10

    For c=1 to 10

    For d=1 to 10

    For e=1 to 10

    I(1)=((((a+b)×c)-d)÷e)
    I(2)=((((a+b)×c)÷d)-e)
    I(3)=((((a+b)-c)×d)÷e)
    I(4)=((((a+b)-c)÷d)×e)
    I(5)=((((a+b)÷c)×d)-e)
    I(6)=((((a+b)÷c)-d)×e)
    I(7)=((((a×b)+c)-d)÷e)
    I(8)=((((a×b)+c)÷d)-e)
    I(9)=((((a×b)-c)+d)÷e)
    I(10)=((((a×b)-c)÷d)+e)
    I(11)=((((a×b)÷c)+d)-e)
    I(12)=((((a×b)÷c)-d)+e)
    I(13)=((((a-b)+c)×d)÷e)
    I(14)=((((a-b)+c)÷d)×e)
    I(15)=((((a-b)×c)+d)÷e)
    I(16)=((((a-b)×c)÷d)+e)
    I(17)=((((a-b)÷c)+d)×e)
    I(18)=((((a-b)÷c)×d)+e)
    I(19)=((((a÷b)+c)×d)-e)
    I(20)=((((a÷b)+c)-d) ×e)
    I(21)=((((a÷b)×c)+d)-e)
    I(22)=((((a÷b)×c)-d)+e)
    I(23)=((((a÷b)-c)×d)+e)
    I(24)=((((a÷b)-c)+d)×e)

    Next e

    Next d

    Next c

    Next b

    Next a

    End

    You may have to program that into a computer, but if needed, please do so.
     
  2. Guest Guest Advertisement



    to hide all adverts.
  3. DaveC426913 Valued Senior Member

    Messages:
    18,960
    I can tell you what it does without having to run it. Although the details depend on what language you use.

    I presume you tried it. What did you find? And what interests you about it?
     
    Last edited: Jul 21, 2020
  4. Guest Guest Advertisement



    to hide all adverts.
  5. DaveC426913 Valued Senior Member

    Messages:
    18,960
    You have not specified a language. Depending on the language you choose, it will either
    - throw a 'type' error, or
    - throw an 'out of array' error, or
    - do nothing at all.

    In a language like Java where datatypes must be explicitly set, it will throw a type error the first time it tries to put a float value into that integer array I.

    In most other languages, arrays start at 0. This one will be indexed from I(0) to I(23). It will throw an error trying to fill I (24), which doesn't exist.

    If you use a language that doesn't get caught up in with of these errors, it will do exactly nothing. The program runs and ends without ever outputting anything.


    What it will not do - in case you were wondering - is throw any kind of 'divide by zero' error. None of those equations result in an invalid value.


    So, again: And what interests you about it?
     
  6. Guest Guest Advertisement



    to hide all adverts.
  7. All Registered Member

    Messages:
    2
    Hello there.

    The first program I ran used 0-9, and, as you suggested, there was a division by zero error. After the second initialisation I found that I COULD divide by zero. Regardless, running the program gives you EVERYTHING, which if you already have that, should negate it. However remembering Nothing negates Everything, so in order to function in a timely manner, you should run the program.
     
  8. James R Just this guy, you know? Staff Member

    Messages:
    39,426
    Moderator note:

    The user calling himself All is a sock puppet of TheFrogger, who was recently banned for 1 month due to accumulated warning points.

    This is a breach of our sock puppet policy.

    Moreover, TheFrogger has now accumulated 100 active warning points, mostly for posting the same kind of nonsense as in the opening post. He did not learn from prior warnings but chose to continue the same behaviour each time he returned from a ban period.

    In accordance with our published site rules, TheFrogger is now permanently banned from sciforums. If you see any more sock puppets of this person, please report them.
     
    exchemist likes this.
Thread Status:
Not open for further replies.

Share This Page