Friends,
In previous article Algorithm and Flowchart we discussed basics about computing like Algorithm and flowcharts. In current article we'll discuss How to find square root of a mathematical equation using Algorithm?
Finding Square root by algorithm
Problem : Find square root of equation a.x2+b.x+c=0 using algorithm.
Algorithm
Step 1: start
step 2: initialize a,b,c x1,x2 as float
step 3: input x,a,b and c
step 4: d=b*b-4*a*c
step 5: if(d<0)
write"roots are not real"
x1=(-b+sqrt(d)/2*a)
x2=(-b-sqrt(d)/2*a)
write"x1,x2"
(end of if statement)
if(d>=0)
write "roots are real"
root1=(-b+sqrt(d)/2*a)
root2=(-b-sqrt(d)/2*a)
write"x1,x2"
(end of if statement)
step:6 end
friends,
I will discuss solution of this problem by flowchart soon............
I need one that shows the steps please. sorry about the symbols, but I wanted to make sure it was clear that I wanted a calculator for this, some people didn't understand that.
ReplyDeleteActually, is a calculator to calculate simplest polynomial functions with given roots even possible?