Question: I was curious to know how I can round a number to the nearest whole number. For instance, if I had:

```
int a = 59 / 4;

```

which would be 14.75 if calculated in floating point; how can I store the result as 15 in "a"?

Answer: 
```
double a=59.0/4;
int b=59/4;
if(a-b>=0.5){
    b++;
}
printf("%d",b);

```

1. let exact float value of 59.0/4 be x(here it is 14.750000)
2. let smallest integer less than x be y(here it is 14)
3. if x-y<0.5 then y is the solution
4. else y+1 is the solution
try using math ceil function that makes rounding up. [Math Ceil](http://www.cplusplus.com/reference/cmath/ceil/) !