title: Ceil function: how can we implement it ourselves?
body: <p>I know that C++ provides us with a ceil function. For practice, I was wondering how can we implement the ceil function in C++. The signature of the method is 
  public static int ceil(float num)</p>
  
  <p>Please provide some insight.</p>
  
  <p>I thought of a simple way: Convert num to a string, find the index of the decimal point, check if the decimal part is greater than 0. If yes, return num+1 else return num. But I want to avoid using the string conversion</p>