public static void printCircleCircumference(int radius) {
double pi = 3.14;
double c = 2 * pi * radius;
System.out.print(c);
}
}
Why my result is 31.400000000000002 ?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Qeviv
16 June 2019, 17:32
Because we used double variable which is more precise than int, that's why such number after comma
0