Hello. I would greatly appreciate it if you answer any one of my questions. I have started planning a program for factoring a quadratic equation (in the form y=ax^2+bx+c). I have some questions about creating this program.
The code for when B^2-4AC is a follows (I haven't yet decided the points for the text command so i will be showing you only what will appear on a calculator):
If B^2-4AC<0
Then:
Text(-B
Text("+sqrt"
Text("-"
Text(-B^2-4AC
Text(")"
Text("(imaginary number)"
Line (didn't decide)
Text( 2A)
1. Lets says that I get (-4 +- sqrt 8i)/ 2, how can I simplify sqrt(8 to 2sqrt(2)? Is a there a command for this? How can I then simplify the answer...to show -2+- sqrt(2)i as the simplified answer?
2. I have created the program for when A=1. Here is the display on the calculator for y=x^2+bx+c:
ROOTS ARE
-2,-3
(X+2 )
(X+3 )
I left a huge space between the 2 and the ) becuase I don't know how big the roots would. Is there a command on the TI-84 Silver Edition, in which I can determine how many digits a certain number consists of?
3. I haven't started to program for when a person inputs a perfect square like y=x^2+2x+1. I know that the calculator can display (X+1)(X+1) but can I make the calculator combine these to say (X+1)^2?
4. I haven't started to program this yet but what if the root are 1/3 and 1/2. How can I display the factored form as (2X-1)(3X-1) and not as (X-(1/2))(X-(1/3))?
5. Do you have any other suggestions or constructive criticism that I can use to make better programs in the future. I am a beginning programmer (started about 2 week ago) and a 13 year old so can you please explain in detail, if possible, some of the optimized code, but I would love it if you give me the simplified code.
Thank you
[/code][/quote]
The code for when B^2-4AC is a follows (I haven't yet decided the points for the text command so i will be showing you only what will appear on a calculator):
If B^2-4AC<0
Then:
Text(-B
Text("+sqrt"
Text("-"
Text(-B^2-4AC
Text(")"
Text("(imaginary number)"
Line (didn't decide)
Text( 2A)
1. Lets says that I get (-4 +- sqrt 8i)/ 2, how can I simplify sqrt(8 to 2sqrt(2)? Is a there a command for this? How can I then simplify the answer...to show -2+- sqrt(2)i as the simplified answer?
2. I have created the program for when A=1. Here is the display on the calculator for y=x^2+bx+c:
ROOTS ARE
-2,-3
(X+2 )
(X+3 )
I left a huge space between the 2 and the ) becuase I don't know how big the roots would. Is there a command on the TI-84 Silver Edition, in which I can determine how many digits a certain number consists of?
3. I haven't started to program for when a person inputs a perfect square like y=x^2+2x+1. I know that the calculator can display (X+1)(X+1) but can I make the calculator combine these to say (X+1)^2?
4. I haven't started to program this yet but what if the root are 1/3 and 1/2. How can I display the factored form as (2X-1)(3X-1) and not as (X-(1/2))(X-(1/3))?
5. Do you have any other suggestions or constructive criticism that I can use to make better programs in the future. I am a beginning programmer (started about 2 week ago) and a 13 year old so can you please explain in detail, if possible, some of the optimized code, but I would love it if you give me the simplified code.
Thank you
[/code][/quote]