Thread: Minute to seconds and a seconds to minute method

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Minute to seconds and a seconds to minute method 
    Registered Member
    Dark Regen's Avatar
    Join Date
    Jan 2009
    Posts
    678
    Thanks given
    184
    Thanks received
    22
    Rep Power
    185
    Well this might be useful..

    well paste this in player.java:
    Code:
            public int MinuteToSecond(int minute) {
    		int second = 60; 
    		int convert = minute * second;
    		return convert;
    	}
    
            public int SecondToMinute(int second) {
    		int minute = 60; 
    		int convert = second/minute;
    		return convert;
    	}
    Example on how to use:

    e.g1.
    Removed
    e.g.2.
    Removed

    command:

    Removed, I think you noobs know how to do this..
    Some got removed due to bad comments likeSARCASM)
    Quote Originally Posted by Vincent View Post
    nice, you can divide and multiply by 60
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Doctor p - Sweet Shop

    Join Date
    Apr 2007
    Age
    28
    Posts
    6,835
    Thanks given
    150
    Thanks received
    584
    Rep Power
    2595
    Integers aren't decimal, so what happens when you do like 119/60?

    I know what happens. But do you?

    Reply With Quote  
     

  3. #3  
    Registered Member
    Dark Regen's Avatar
    Join Date
    Jan 2009
    Posts
    678
    Thanks given
    184
    Thanks received
    22
    Rep Power
    185
    Quote Originally Posted by Nathan View Post
    Integers aren't decimal, so what happens when you do like 119/60?

    I know what happens. But do you?
    dude i used calculator, 119/60 = 1.983* minutes *TESTING IN SERVER*

    EDIT: WORKED FINE
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Oct 2009
    Posts
    1,312
    Thanks given
    148
    Thanks received
    161
    Rep Power
    33
    Quote Originally Posted by Nathan View Post
    Integers aren't decimal, so what happens when you do like 119/60?

    I know what happens. But do you?
    declare it as, double.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Jul 2008
    Posts
    539
    Thanks given
    4
    Thanks received
    8
    Rep Power
    89
    Quote Originally Posted by >dark life View Post
    dude i used calculator, 119/60 = 1.983* minutes *TESTING IN SERVER*

    EDIT: WORKED FINE
    You know nothing fail
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Community Veteran



    Join Date
    Jan 2008
    Posts
    3,448
    Thanks given
    46
    Thanks received
    973
    Rep Power
    4723
    better way to do it

    Code:
    	public double MinuteToSecond(double minute) {
    		return (minute * 60);
    	}
    
    	public double SecondToMinute(double second) {
    		return (second/60);
    	}

    or use these

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  8. #7  
    Registered Member
    Dark Regen's Avatar
    Join Date
    Jan 2009
    Posts
    678
    Thanks given
    184
    Thanks received
    22
    Rep Power
    185
    Quote Originally Posted by Flamable View Post
    better way to do it

    Code:
    	public double MinuteToSecond(double minute) {
    		return (minute * 60);
    	}
    
    	public double SecondToMinute(double second) {
    		return (second/60);
    	}

    or use these

    [Only registered and activated users can see links. ]
    Yeah u can do that too
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #8  
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    364
    Rep Power
    550
    nice, you can divide and multiply by 60
    Reply With Quote  
     

  10. #9  
    Registered Member
    Dark Regen's Avatar
    Join Date
    Jan 2009
    Posts
    678
    Thanks given
    184
    Thanks received
    22
    Rep Power
    185
    [SBA][/SBA]
    Quote Originally Posted by Vincent View Post
    nice, you can divide and multiply by 60
    umm? You meant that in a good way or bad way?

    Quote Originally Posted by X-Logic View Post
    You know nothing i fail
    Exactly..
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  11. #10  
    Registered Member

    Join Date
    Jul 2008
    Posts
    539
    Thanks given
    4
    Thanks received
    8
    Rep Power
    89
    Quote Originally Posted by >dark life View Post
    [SBA][/SBA]

    umm? You meant that in a good way or bad way?



    Exactly..
    What u think? and how do i fail? and don't edit it only noobs do that
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •