Are the values: bytes and seconds? Dividing those two would give a rate: bytes/second Not a total.
What is the total you are trying to compute? What units is it in? time or bytes or ???
Is...
Type: Posts; User: Norm
Are the values: bytes and seconds? Dividing those two would give a rate: bytes/second Not a total.
What is the total you are trying to compute? What units is it in? time or bytes or ???
Is...
Do you have the formula or equation to do that?
Is that value input by the user?
If so, use the same technique that the code uses to get the totalSec value from the user: print a message and use a Scanner class method to read the user's input.
One possible problem could be the code is doing int math:
40/60 = 0
vs floating point
40/60.0 = 0.66666666