C
C#3y 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
surwrenOP3y ago
yes, precision
AhmadHija
AhmadHija3y 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
Want results from more Discord servers?
Add your server