riotcity90
New member
- Joined
- Dec 4, 2017
- Messages
- 2
- Programming Experience
- Beginner
Hey guys, I recently just discovered this forum and its been helpful with learning VB. I'm trying to learn it more and I have a few questions that I'm not sure are correct or not, any help or confirmation for what I think the answers are would be appreciated!
Write an If ... Then statement that multiplies the variable decPayRate by 1.5 when intHours is greater than 40.
If intHours > 40 Then
decPayRate = decPayRate *1.5
End If
Is this the correct syntax for that statement? or would it be decPayRate *= 1.5 ?
List two VB.NET controls that can be used to collect input from the user
I know one would be a textbox, but not sure what the other would be, possibly label?
Write a complete If statement that assigns 20 to the variable, moneyOwed, if the CheckBox named, chkOptionOne, is selected.
If chkOptionOne.checked = True Then
moneyOwed.text = 20
End If
Not sure if I would have to do anything else for that to work?
Write an If..Then..Else statement that assigns the number 35 to the intCommission variable when the decSales variable contains a number that is less than or equal to $250; otherwise, assign the number 50.
If decSales <= 250 Then
intCommission = 35
Else intCommission = 50
Did I correctly use the Else there? and what would I have to do for the $ to be there, or would that just come back from a currency string statement?
Which of the following compound conditions can be used to determine whether the value in the variable, intQuantity, is outside the range of 0 - 500.
Honestly not sure what a compound condition is, can't find it online or in the book that I own.
Thanks a lot for reading this and sorry its so long. Any help would be immensely appreciated!
Write an If ... Then statement that multiplies the variable decPayRate by 1.5 when intHours is greater than 40.
If intHours > 40 Then
decPayRate = decPayRate *1.5
End If
Is this the correct syntax for that statement? or would it be decPayRate *= 1.5 ?
List two VB.NET controls that can be used to collect input from the user
I know one would be a textbox, but not sure what the other would be, possibly label?
Write a complete If statement that assigns 20 to the variable, moneyOwed, if the CheckBox named, chkOptionOne, is selected.
If chkOptionOne.checked = True Then
moneyOwed.text = 20
End If
Not sure if I would have to do anything else for that to work?
Write an If..Then..Else statement that assigns the number 35 to the intCommission variable when the decSales variable contains a number that is less than or equal to $250; otherwise, assign the number 50.
If decSales <= 250 Then
intCommission = 35
Else intCommission = 50
Did I correctly use the Else there? and what would I have to do for the $ to be there, or would that just come back from a currency string statement?
Which of the following compound conditions can be used to determine whether the value in the variable, intQuantity, is outside the range of 0 - 500.
Honestly not sure what a compound condition is, can't find it online or in the book that I own.
Thanks a lot for reading this and sorry its so long. Any help would be immensely appreciated!