Jump to content

Organizar numeros


Recommended Posts

Boas, estou com um problema neste pedaço de código. Supostamente deveria gerar um numero aleatorio e organiza-lo por ordem crescente, o problema é que umas vezes organiza e outras não

            E1 = (Int((11 * Rnd()) + 1))
            E2 = (Int((11 * Rnd()) + 1))
        Loop Until (E1 <> E2)

        If (E1 > N2) Then
            Label16.Text = E1
            Label19.Text = E2

            Label16.Text = E2
            Label19.Text = E1
        End If

Alguma ideia do que estou a errar?

EDIT: GeSHi adicionado

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

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.