Está en la página 1de 1

Sub Main() Dim ano1, mes1, dia1, DMES(12), cant1, a, b, c As Integer DMES(1) = 31 DMES(2) = 28 DMES(3) = 31 DMES(4) = 30 DMES(5) = 31 DMES(6)

= 30 DMES(7) = 31 DMES(8) = 31 DMES(9) = 30 DMES(10) = 31 DMES(11) = 30 DMES(12) = 31 Console.WriteLine("dias entre dos fechas") ano1 = Console.ReadLine cant1 = (ano1 - 1) * 365 cant1 = cant1 + ((ano1 - 1) / 4) a = ano1 / 4 b = a * 4 If b = ano1 Then DMES(2) = 29 Else DMES(2) = 28 End If c = 1 Do Until c = mes1 cant1 = cant1 + DMES(c) c = c + 1 Loop cant1 = cant1 + dia1 Console.WriteLine("los dias son") cant1 = Console.ReadLine End Sub

También podría gustarte