Jump to content

Array Problem


Recommended Posts

Hi,

i have some problem with my simple code:

#Include <Array.au3>

$IterationNumber=4

$IterationNumberProcent=100/$IterationNumber

Local $IterationNumberArray[$IterationNumber]

For $i = 1 To UBound($IterationNumber)

$IterationNumberArray[$i] = $IterationNumberProcent + $IterationNumberArray[$i-1]

Next

_ArrayDisplay($IterationNumberArray)

How can i get my $IterationNumberArray in this Form:

25

50

75

100

Link to comment
Share on other sites

#Include <Array.au3>

$I_NUM = 4
$I_PERC = 100/$I_NUM
Dim $I_ARRAY[$I_NUM]

For $I = 0 To $I_NUM-1
    $I_ARRAY[$I] = $I * $I_PERC + $I_PERC
Next
_ArrayDisplay($I_ARRAY)

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...