반응형

1. ceil() 사용

 

2. int a = 46.7 + 0.5

a == 47

0.5를 더하고 int 자료형에 넣어주면 반올림된다.

46.2 + 0.5 --> 46

+ Recent posts