none
Can anyone explain what's happening? RRS feed

  • Question

  • Okay...
    I'm trying to understand why this code is so unexplicable.


    Dim total_seconds As Integer = 31
    
    Dim minutes As Integer = total_seconds / 60
    Dim seconds As Integer = total_seconds - (minutes * 60)
    
    Console.WriteLine(CStr(minutes) + " - " + CStr(seconds))


    The result i'ts suposed to be "0 - 31" but is "1 - -29" instead....
    My only question is ¿why?, and I'm not joking, I don't understand.


    Thank you very much.




    Thursday, March 2, 2017 5:59 PM

Answers