Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Java Problem

  • 26-07-2006 8:39am
    #1
    Registered Users, Registered Users 2 Posts: 357 ✭✭


    I am trying to write a program that is a degree calculator. I have it taking in a value for degrees minutes and second. I am trying to get it to do a "roll-over". When it reachs 60 seconds it'll become one minute 60 minutes 1 degree and 360 degrees rollover to zero. Anyone have ay ideas


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Get the modulus of 360 of the number.


  • Registered Users, Registered Users 2 Posts: 357 ✭✭apoch632


    thats like
    (number taken in)%360;

    isn't it


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Yep. Its the remainder part of the sum.


  • Registered Users, Registered Users 2 Posts: 357 ✭✭apoch632


    thanks man


Advertisement