solidsnake Posted June 10, 2012 at 02:28 PM Report Share #461766 Posted June 10, 2012 at 02:28 PM Boa dia/tarde/noite Tenho uma duvida num passo para resolver um problema com vectores. O problema consiste em fazer um programa que se um vector tiver comprimento impar, ele apaga o termo do meio e transforma num novo vector mas com comprimento par com menos um indice. Ora ainda estou na parte de tentar arranjar uma maneira de indentificar o indice do meio.Podiam ajudar? Tipo uma dica matemática, ajudava, não precisam de estar a escrever o código , basta que me digam uma dica para identificar o indice do meio de um vector. Best regards Link to comment Share on other sites More sharing options...
KTachyon Posted June 10, 2012 at 02:44 PM Report Share #461768 Posted June 10, 2012 at 02:44 PM length / 2 “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -- Tony Hoare Link to comment Share on other sites More sharing options...
pmg Posted June 10, 2012 at 03:12 PM Report Share #461772 Posted June 10, 2012 at 03:12 PM Se a parte do "apaga o elemento do meio" poder ser alterada, sugiro que a alteração seja "apaga o último elemento". What have you tried? Não respondo a dúvidas por PM A minha bola de cristal está para compor; deve ficar pronta para a semana. Torna os teus tópicos mais atractivos e legíveis usando a tag CODE para colorir o código! 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