Ejercicio
División entre dos números
Objetivo
Escribe un programa en Visual Basic que muestre en pantalla el resultado de la división de los números 24 y 5.
Código
' Main class definition
Public Class Program
' Main subroutine, entry point of the program
Public Shared Sub Main()
' Declare and initialize two integers
Dim dividend As Integer = 24
Dim divisor As Integer = 5
' Calculate the division result as a double to allow decimal places
Dim result As Double = dividend / divisor
' Display the result of the division on the screen
Console.WriteLine("The result of dividing 24 by 5 is: " & result)
End Sub
End Class