# Problem of the Week

Discussion in 'Visual Basic ( VB )' started by pawnamerica, Jan 30, 2015.

1. ### pawnamericaNew Member

Joined:
Jan 30, 2015
Messages:
1
0
Trophy Points:
0
Occupation:
Student
Location:
Minnesota
Solve the following and Post your Loop! I will compile each program you submit and post if you are right or wrong! Have Fun!
Code:
```' LeftOrRight.vb - This program calculates the total number of left-handed and right-handed
'                    students in a class.
' Input:  L for left-handed; R for right handed; X to quit.
' Output: Prints the number of left-handed students and the number of right-handed students.
Option Explicit On
Option Strict On
Module LeftOrRight
Sub Main()
' Declarations
Dim LeftOrRight As String     ' L or R for one student
Dim RightTotal As Integer = 0 ' Number of right-handed students
Dim LeftTotal As Integer = 0  ' Number of left-handed students

' This is the work done in the housekeeping() procedure
LeftOrRight = InputBox\$("Enter L if you are left-handed, R if you are right-handed or X  to quit.")
' This is the work done in the detailLoop() procedure