File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dividing into two variables

 
Peter Shipway
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey yo all me again
Is they a way to / a number into two differnt variables with the quoteint in one and the reminder in the other? eg.
10 / 4 = 2.5
x = 2
y = 5
Thanks much for any help.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "/" operator will give you the quotient; the "%" operator will give you the remainder (not a fraction, but the actual remainder.) SO you can do this with two operations.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic