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
1 Answer
+ 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