Convert int to double | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Convert int to double

Iā€™m trying to convert an integer into a double. I tried Convert.ToDouble (t) t = Y Y is a number that might be a decimal depending on what the user inputs https://code.sololearn.com/c8tz4t5lr9qu/?ref=app

25th Jun 2018, 3:17 PM
Ryan Wu
1 Resposta
+ 2
Convert.ToDouble doesnā€˜t change the data type of the variable t, it instead returns the content of that variable cast to a double. hence you canā€˜t assign the variable Y of type double to the variable t of type int
25th Jun 2018, 3:26 PM
Max
Max - avatar