This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

formatting float values  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ,
i have a little problem with formatting my float values.
i have following float values:
float omni_basisvertrag = 0;
float omni_basisprovision = 0;
float omni_relation = 0;
after a few sql selections i calculate a percent value:
omni_relation = (omni_basisprovision*100) / omni_basisvertrag);
the omni_relation is now something like 9.8897473587,
but i want 9.89 .
can anybody help please
andreas
 
andreas test
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
sorry for my question.
i found the answer in one of the last postings.
andreas s
 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!