Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Sonnet of the day from sparkenotes no fear shakespeare...
'Rextester.Program.Main is the entry point for your code. Don't change it. 'Compiler version 11.0.50709.17929 for Microsoft (R) .NET Framework 4.5 Imports System : Imports System.Collections.Generic : Imports System.Linq : Imports System.Text.RegularExpressions Namespace Rextester Public Module Program 'https://www.programmingalgorithms.com/algorithm/day-of-year?lang=VB.Net Public Function DayOfYear(year As UInteger, month As Byte, day As Byte) As Integer Dim days As UShort() = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334} If IsLeapYear(year) AndAlso month >= 2 Then Return days(month - 1) + day + 1 End If Return days(month - 1) + day End Function Private Function IsLeapYear(year As UInteger) As Boolean Return (year Mod 4 = 0 AndAlso (year Mod 100 <> 0 OrElse year Mod 400 = 0)) End Function Public Sub Main(args() As string) 'Your code goes here Dim doy = DayOfYear(CUInt(DateTime.Now.Year), CByte(DateTime.Now.Month), CByte(DateTime.Now.Day)) Console.WriteLine("This is day " & doy & " of the year...(" & doy & " mod 150)+1...") Console.WriteLine("https://www.sparknotes.com/nofear/shakespeare/sonnets/sonnet_" & (doy mod 150)+1 & "/") End Sub End Module End Namespace
run
|
edit
|
history
|
help
0
CAI Visual Basic - Ej Gastos Chofer
CAI Visual Basic - Ej Mundial
exercicio 2 2019 11 11
Algorithm to create first letter of each word mnemonic
Denary numbers to binary for numbers below 255
Range List for VisualBasic.NET
VB checking whether a date is between 2 dates
Black Jack
RSA Encyption example with large numbers using System.Numerics.BigInteger
CAI - Visual Basic - Ej. Citas Reloaded