legd1991 Posted February 27, 2012 at 11:15 AM Report Share #441297 Posted February 27, 2012 at 11:15 AM Boa tarde, Alguém me pode ajudar com este pequeno problema? Preciso de arredondaraos milheres, por exemplo: tenho o valor 60000,01 e quando fosse arredondado ficasse 61000. Desde ja obrigado Cumps Luis Dias Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted February 27, 2012 at 11:17 AM Report Share #441298 Posted February 27, 2012 at 11:17 AM se resto da divisão de x por 1000 for maior que 0 então x = x+1000 IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
legd1991 Posted February 27, 2012 at 11:30 AM Author Report Share #441300 Posted February 27, 2012 at 11:30 AM Se eu tiver 1021,00 o resto da divisão vai ser maior que 0 e neste caso não tem que arredondar Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted February 27, 2012 at 11:47 AM Report Share #441305 Posted February 27, 2012 at 11:47 AM então em vez de dividires por 1000, divide por 1 IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
legd1991 Posted February 27, 2012 at 12:04 PM Author Report Share #441309 Posted February 27, 2012 at 12:04 PM Sim, assim já parece funcionar.. Obrigado Cumps Luis Dias 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