C
C#2y ago
surwren

Casting and output

So take a basic example like
double avg = ((double)num1 + num2) / 2;
double avg = ((double)num1 + num2) / 2;
If you take the (double) cast out from num1, avg won't reflect the decimal point. Is there a google keyword I can search for more information on how to ascertain that my numbers will be reflected as I would like them to be?
2 Replies
surwren
surwren2y ago
yes, precision
ahmadhija🌵
ahmadhija🌵2y ago
If i want to take the frictional numbers only like from 4.11 just 0.11 what I’m i supposed to do using casting