Changing int to float not working | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответ
+ 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