vianabana Posted February 7, 2014 at 07:33 PM Report #544401 Posted February 7, 2014 at 07:33 PM Queria saber qual o código para o resultado de uma divisão ter casas decimais?
bioshock Posted February 7, 2014 at 07:35 PM Report #544403 Posted February 7, 2014 at 07:35 PM Trabalhas com valores decimais e não inteiros.
Rechousa Posted February 7, 2014 at 08:46 PM Report #544411 Posted February 7, 2014 at 08:46 PM (edited) Trabalhas com valores decimais e não inteiros. Tais como decimal ou double. Exemplo: int valor1 = 20; int valor2 = 3; decimal valor3 = (decimal)valor1 / (decimal)valor2; float valor4 = (float)valor1 / (float)valor2; Espero ter ajudado, Edited February 7, 2014 at 08:46 PM by Rechousa Pedro Martins Sharing is Knowledge! http://www.linkedin.com/in/rechousa
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