Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

how do you divide in java


This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 divinity03


    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 117 posts

Posted 10 December 2015 - 07:58 AM

hi everyone


i am doing a program where division is the last round that i have to implemented. the tricky part is: to divide, the first number must and i say must be divisible by the second number. how do i construct a java code to get the exact result.


it is the last round in the math game. the math game is a multiple choice and the answer must be randomized. the first set of numbers must generate random number from 1  to 25 and the second one must generate from 2 to 9 and it must be randomized. 


one of the rules states: please note that the first number must be divisible by the second number, e.g. 20/4 and the option should be





something like that. 


what code do i use in order to get it. it must not be zero and it must not generated zero. it is not an option. plz help 

#2 dargueta


    I chown trolls.

  • Moderator
  • 4854 posts

Posted 23 December 2015 - 01:50 AM

Hint: This will help. http://www.cafeaulai...e/week2/15.html

sudo rm -rf / && echo $'Sanitize your inputs!'

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download