title: How can I get rid of fraction? (The fraction somehow still remains.)
body: <p>I'm trying to make a &quot;Distance &amp; Speed to Time&quot;
  But the fraction is obstructing me to calculate the minute part.
  Like... the hour part still have a fractional value somewhere.</p>
  <p>This is what I want.</p>
  <p>In this example Distance is 130 km and speed is 40 km/hr</p>
  <p>Answer I want is</p>
  <pre><code>3 Hour(s) 15 Minute(s) 0 Second(s)
  </code></pre>
  <p>But what I get is</p>
  <pre><code>3 Hour(s) **0 Minute(s) 0 Second(s)**
  </code></pre>
  <pre><code>
  float Bx = 130;
  float By = 40;
  int x = (int) Bx;
  int y = (int) By;
  var KeepSecond = (x / y * 3600) ;
  var HourX = KeepSecond/3600;
  
  int Hour = (int) HourX;
  var MinuteX = (KeepSecond-(Hour*3600))/60;
  int Minute = (int) MinuteX;
  var SecondX = (KeepSecond-(Hour*3600)-(Minute*60));
  int Second = (int) SecondX;
  String result = String.format(Hour+&quot; Hour(s) &quot;+Minute+&quot; Minute(s) &quot;+Second+&quot; Second(s) &quot;);
  Answer.setText(result);
  
  </code></pre>