Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

תרגיל 5 שאלה 2

Module Module1

    Sub Main()
        Dim time As Integer = CInt(Console.ReadLine)
        Dim days As Integer = (time \ 86400)
        Dim hours As Integer = (time \ 3600)
        Dim minutes As Integer = (time \ 60)
        Dim seconds As Integer = (time)
        If days > 0 Then
            Console.Write(days & " days ")
        End If

        If hours > 0 Then
            Console.Write(days Mod hours & " hours ")
        End If
        If minutes > 0 Then
            Console.Write(hours Mod minutes & " minutes ")
        End If
        If seconds > 0 Then
            Console.Write(minutes Mod seconds & " seconds")
        End If
        Console.ReadKey()

    End Sub

End Module

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.