Visual Basics, write the statement to add 1,2 and 3 together and multiplythe intermediate result by 4, then raise that intermediate result to the power of 2 store the result in a variable named mintresult
Printable View
Visual Basics, write the statement to add 1,2 and 3 together and multiplythe intermediate result by 4, then raise that intermediate result to the power of 2 store the result in a variable named mintresult
like this?
VB Code:
minresult = ((1 + 2 + 3) * 4) ^ 2
sorry, my maths is off, so i dunno if i've understood 'intermediate result' ;)
me neither nullus...
but I think you got it :D
Private Sub Form_Load()
Dim a As Integer
dim b as integer
dim c as integer
dim d as integer
dim e as integer
dim mintresult as integer
a = 1
b = 2
c = 3
d = a+b+c
e = d * 4
mintresult = e * e
'to check the answer put take the comment out of the next
'line
'debug.print minresult
'it will print the answer to the debug section
End Sub
So much shorter than mine... DAMN!!!! i think mine might be more easily readable though.Quote:
like this?
visual basic code:--------------------------------------------------------------------------------minresult = ((1 + 2 + 3) * 4) ^ 2
--------------------------------------------------------------------------------
sorry, my maths is off, so i dunno if i've understood 'intermediate result'
wow, i got a maths question right?? good lord! :eek:
hehe, I just passes calc in school this semester and don't remember using intermediate, but I'll agree with you both.
but lets make it more complicates
mintresult = (((1 + 2 + 3)*4)^2)
------------------------
x = 1
y = 2
z = 3
(((X + Y + Z)*(y^y))^Y)
I like my way better. :D
???????? *** i cannot understand that for the life of me
LOL, Nullus now you and Guv are the maths guys around here.
think i'll be allowed to be the moderator of the Maths forum now? :p
Yeah, they need some fresh blood down there.
:D