Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Print odd or even integers


Print odd or even integers

Author
Message
willharden96
willharden96
Forum God
Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)

Group: Forum Members
Posts: 2, Visits: 3
I have a problem I can not resolve can anyone see the problem.

a.      The following code should print whether the Integer variable’s value is odd or even:

Select (value Mod 2)

   Case 0

     lblOutput.Text = (“Even integer”)

   Case 1

     lblOutput.Text = (“Odd integer”)

Select End


zack
zack
Forum God
Forum God (24K reputation)Forum God (24K reputation)Forum God (24K reputation)Forum God (24K reputation)Forum God (24K reputation)Forum God (24K reputation)Forum God (24K reputation)Forum God (24K reputation)Forum God (24K reputation)

Group: Forum Members
Posts: 102, Visits: 110
What error message are you getting? Try adding the Case keyword to the first line.



Select Case (value mod 2)
willharden96
willharden96
Forum God
Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)Forum God (840 reputation)

Group: Forum Members
Posts: 2, Visits: 3
Thanks Zack, I will try that my first week programming and trying to understand what I am reading.
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search