7 Replies - 6585 Views - Last Post: 16 November 2010 - 04:11 PM Rate Topic: -----

#1 little-buddy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 16-November 10

using vb script to solve quadratic equation

Posted 16 November 2010 - 05:36 AM

Hi guys i am new to computer programming and have been asked to make a web page that solves quadratic equations using vb script. Can anyone help me out??
Is This A Good Question/Topic? 0
  • +

Replies To: using vb script to solve quadratic equation

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10488
  • View blog
  • Posts: 38,869
  • Joined: 27-December 08

Re: using vb script to solve quadratic equation

Posted 16 November 2010 - 07:14 AM

Show us your good faith efforts, and we will be happy to help.

Remember to post your code using code tags, like so: :code:.
Was This Post Helpful? 0
  • +
  • -

#3 Guest_Dan taylor*


Reputation:

Re: using vb script to solve quadratic equation

Posted 16 November 2010 - 08:50 AM

good faith efforts??

Was This Post Helpful? 0

#4 little-buddy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 16-November 10

Re: using vb script to solve quadratic equation

Posted 16 November 2010 - 09:10 AM

what are good faith efforts

This post has been edited by little-buddy: 16 November 2010 - 09:10 AM

Was This Post Helpful? 0
  • +
  • -

#5 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 300
  • View blog
  • Posts: 1,773
  • Joined: 26-March 09

Re: using vb script to solve quadratic equation

Posted 16 November 2010 - 09:15 AM

What macosxnerd101 is trying to say, is that no-one will just write something for you.

Have a go yourself (show good faith....in other words, you tried but got to a point where you can't go on).

Post what code you have and what errors you're experiencing, then people will be prepared to assist.

Try viewing the some of the tutorials in the web development forums here as a starting point.

This post has been edited by maj3091: 16 November 2010 - 09:15 AM

Was This Post Helpful? 0
  • +
  • -

#6 little-buddy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 16-November 10

Re: using vb script to solve quadratic equation

Posted 16 November 2010 - 09:19 AM

would make things easier for me though if someone done it for me :D but okay ill give it a go

would make things easier for me though if someone done it for me :D but okay ill give it a go
Was This Post Helpful? 0
  • +
  • -

#7 little-buddy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 16-November 10

Re: using vb script to solve quadratic equation

Posted 16 November 2010 - 12:27 PM

i tried starting it but dint really no where to start and got annoyed with it, any chance someone could help me out just to start it at least?
Was This Post Helpful? 0
  • +
  • -

#8 little-buddy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 16-November 10

Re: using vb script to solve quadratic equation

Posted 16 November 2010 - 04:11 PM

okay this is what i have so far:

<html>
<head><title> Quadratic Equation Solver </title></head>
<p><b> Quadratic Equation Solver</b></p>
<body style="background-color:PowderBlue;">
<form name="theform">
<p>ax^2 + bx + c = 0</p>
A: <input type="text" name="a" /><br />
B: <input type="text" name="b" /><br />
C: <input type="text" name="c" /><br />
<p id="resultmate"></p>
<input type="button" name="calc" value="calculate" />
</form>
</body>
</html>
 
<script type="vbscript">
Sub calc_onclick()
a = theform.a.value
b = theform.b.value
c = theform.c.value
X1 = (-B + Sqr(B * B - 4 * A * C)) / (2 * A)
X2 = (-B - Sqr(B * B - 4 * A * C)) / (2 * A)
 
document.all.resultmate.InnerHTML = "x = " & X1 & "<br />x = " & X2
End Sub
</script>


anything i can do to improve it??
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1