• Post Reply Bookmark Topic Watch Topic
  • New Topic

convert from int to hundred per cent  RSS feed

 
Isaac Ferguson
Ranch Hand
Posts: 1063
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am interested in convert from number to %.

For example if

10 is 100% for me then x is x%. Is there any function available?

Any idea?

Thanks
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a simple proportion problem, why don't you write a method to do that?
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if you do end up needing help, you'll have to describe what you're trying to achieve more precisely than this:

Angus Ferguson wrote:
10 is 100% for me then x is x%.


10 is in fact 1000%, not 100%. Unless you meant to say that 10 is 100% of something (such as a 100% score on a 10-point test). But if that's the case, then "x is x%" is not consistent with that.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!