0% found this document useful (0 votes)
1K views1 page

VB Code

This Visual Basic code asks the user to input their hours worked and calculates their vacation time based on that number. It checks if the hours are less than 40, in which case no vacation is allowed, or if the hours are 40 or more, it divides the hours by 40 to get the number of weeks of vacation to display.

Uploaded by

Avdhesh Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views1 page

VB Code

This Visual Basic code asks the user to input their hours worked and calculates their vacation time based on that number. It checks if the hours are less than 40, in which case no vacation is allowed, or if the hours are 40 or more, it divides the hours by 40 to get the number of weeks of vacation to display.

Uploaded by

Avdhesh Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Module Module1

Sub main()
Dim h, w As Integer
Console.Write("Hours of Working: ")
h = CInt(Console.ReadLine())
If h < 40 Then
Console.WriteLine("No vacation is allowed")
ElseIf h >= 40 Then
w = h / 40
Console.WriteLine("Vacation will be " + w.ToString())
End If
Console.ReadLine()
End Sub
End Module

You might also like