math

java, factorial calculation

Hello. how to get a full number that goes beyond the long type, and therefore gives a wrong answer. most likely, there will b ... ctoring(long x){ for(long i = 1; i<=x; i++){ result *= i; } return result; } } }

Rounding up doesn't work

int a = 28; int b = (int) Math.ceil(a * 200 / 900); sout(b) Outputs 6. Waiting for 7. A regular calculator gives you 28 * 200 / 900 = 6.2222, and I expect this code to round up. What am I doing wrong?