[program-l] Float to integer

  • From: <pablocmd2014@xxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Mon, 12 Apr 2021 23:48:12 -0400

Hello all,

 

I am working on C on visual Studio 2019, and I am stuck with a very simple
thing that there is no easy way to do on C. I am needing to show as integer
the results of float values. Additionally, I should show these values
rounded to the closer integer.

I have several days trying different things. But, nothing has worked.

 

Anybody has an idea about how to do that?

It should work with float or double variables.

 

Thanks in advance,

 

Pablo

 

Other related posts: