1.
Evaluate:
A<=B AND B>=A, if A=12, B=6 and C=8
my answer: A<=B AND B>=A returns False
but why is C=8 there.........
2.
if A = "You are doing" and B = "programming", evaluate A+B and A&B
ii) Is the operation A-B possible?
Any help appreciated
Printable View
1.
Evaluate:
A<=B AND B>=A, if A=12, B=6 and C=8
my answer: A<=B AND B>=A returns False
but why is C=8 there.........
2.
if A = "You are doing" and B = "programming", evaluate A+B and A&B
ii) Is the operation A-B possible?
Any help appreciated
Maybe it's there to throw off the right track those who are not confident about their understanding. But are you sure you have transcribed it correctly?Quote:
Originally Posted by lgwo06
hmmm well after figuring it out in math terms it came close to c=8 but thats math not vb terms which is why i asked this question.......I gotta get 80% man......to be accepted in a particular study class, which I really want to be apart of......I don't expect an answer but I'd like some help to figure these 2 things out ......how do I do it?
1) Is this what you want?Quote:
Originally Posted by lgwo06
2) How are + and & to be interpreted? If it's as VB operators then,Code:Dim A As Integer
Dim B As Integer
Dim C As Integer
A = 12
B = 6
C = 8
Msgbox CBool(A <= B And B >= A)
I don't know what the minus sign could mean applied to strings.Code:Dim A As String
Dim B As String
A = "You are doing"
B = "Programming"
Msgbox A + B & vbCrLf & A & B
For the 1st question the hint was to break the equation into simpler form using AND or OR operators to evaluate. The answer should evaluate to True or False.
For the 2nd question I for some reason thought it would be something like:
A + B = "You are doing programming" or something along those lines.....but I doubt it....I'm actually reading some things on vb online so hope I'll get an idea after reading through a few of those...
Thanks
Not knowing what sort of level of maths you're working at, I would assume that yes, this is the case.Quote:
Maybe it's there to throw off the right track those who are not confident about their understanding. But are you sure you have transcribed it correctly?
For question 2, i think they just want to see you distinguish between the different operators (if this is VB-related). So try a program to do the operations and see what results you get:
VB Code:
dim A as String dim B as String Private Sub Form_Load() A = "You are doing" B = "programming" Msgbox A+B Msgbox A&B Msgbox A-B End Sub
Let me know if anything doesn't make sense
Hi, thanks alot to the both of you for helping me with these equations.