Changing int to float not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Changing int to float not working

In Printing Text - Displaying Output, why changing int into float and writing a decimal number doesn't work?

31st Oct 2016, 8:17 AM
Lawlenne
1 Answer
+ 1
Try something like: float test = (float)45; Console.Writeline(test); The "test" name can be anything you want and so the value "45" can be any integer you want.
31st Oct 2016, 8:51 AM
Ousmane Diaw