Professional Documents
Culture Documents
VisualBasic
Imports System.Console
'*******EJEMPLO******
'Public Class Bicicleta
'
Public Modelo As String
'
Public Precio As Double
'
Public NumeroDeVelocidades As Integer
'
Private Velocidad As Integer
'
'
'
'
'
'
'
'
'
Public Function ConsutarVelocidad() As Integer
'
Return Velocidad
'
End Function
'End Class
WriteLine(vbCrLf & "Descripcion del artciculo: {0}" & vbCrLf & "Prec
io anterior del articulo: {1}$" & vbCrLf & "Precio actual del articulo: {2}$" &
vbCrLf & "porcentaje de inflacion: {3}%", des, ant, act, inflacion.ToString("#,#
#0.00"))
WriteLine(vbCrLf & "Precio anterior total: {0}", tot1)
Console.WriteLine(vbCrLf & "Precio actual total: {0}", tot2)
WriteLine(vbCrLf & vbCrLf & "Desea introducir otro cliente? S/N")
resp = Console.ReadLine()
Clear()
Loop While (resp = "s" Or resp = "S")
End Sub
Public Function calcular_inflacion(ByVal act1 As Double, ByVal ant1 As Doubl
e) As Double
Dim infla As Double
infla = (((act - ant) / ant) * 100)
Return infla
End Function
End Class