alfaiate Posted March 2, 2012 Report Share Posted March 2, 2012 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 Do E1 = (Int((11 * Rnd()) + 1)) E2 = (Int((11 * Rnd()) + 1)) Loop Until (E1 <> E2) If (E1 > N2) Then Label16.Text = E1 Label19.Text = E2 Else 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 More sharing options...
xtrm0 Posted March 2, 2012 Report Share Posted March 2, 2012 "if E1>N2" deveria ser "if E1>E2" <Signature goes here> Link to comment Share on other sites More sharing options...
alfaiate Posted March 3, 2012 Author Report Share Posted March 3, 2012 "if E1>N2" deveria ser "if E1>E2" Obrigadão, ja aqui estava empatado á um tempão por um erro tão simples. Obrigado. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now