0
Why this code doesnt work?
const float PI= 3.14; Console.WriteLine(PI); // ERROR const double PI=3.14; Console.WriteLine(PI); // NO ERROR please help me there..
3 Respuestas
+ 3
All decimals are treated as double by default, to specify a float, suffix the number with an "f".
const float pi = 3.142f; // float
const double pi = 3.142; // double
0
D'Lite thanks i got you