|
-
Sep 5th, 2007, 09:35 PM
#1
Thread Starter
New Member
need help evaluating a couple things
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
-
Sep 6th, 2007, 03:36 AM
#2
Re: need help evaluating a couple things
 Originally Posted by lgwo06
...
but why is C=8 there.........
...
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?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Sep 6th, 2007, 05:12 AM
#3
Thread Starter
New Member
Re: need help evaluating a couple things
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?
-
Sep 6th, 2007, 05:51 AM
#4
Re: need help evaluating a couple things
 Originally Posted by lgwo06
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
1) Is this what you want?
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)
2) How are + and & to be interpreted? If it's as VB operators then,
Code:
Dim A As String
Dim B As String
A = "You are doing"
B = "Programming"
Msgbox A + B & vbCrLf & A & B
I don't know what the minus sign could mean applied to strings.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Sep 7th, 2007, 07:14 PM
#5
Thread Starter
New Member
Re: need help evaluating a couple things
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
-
Sep 9th, 2007, 06:26 AM
#6
Hyperactive Member
Re: need help evaluating a couple things
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?
Not knowing what sort of level of maths you're working at, I would assume that yes, this is the case.
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
-
Sep 12th, 2007, 07:42 PM
#7
Thread Starter
New Member
Re: need help evaluating a couple things
Hi, thanks alot to the both of you for helping me with these equations.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|