-
Notifications
You must be signed in to change notification settings - Fork 0
/
quadratic.fprg
36 lines (36 loc) · 1.98 KB
/
quadratic.fprg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="placement"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-11-04 10:16:44 AM"/>
<attribute name="created" value="cGxhY2VtZW50OzIwMjIyM01BWUMwMDQ2OzIwMjItMTEtMDQ7MDk6MzA6NDUgQU07MzAxNA=="/>
<attribute name="edited" value="cGxhY2VtZW50OzIwMjIyM01BWUMwMDQ2OzIwMjItMTEtMDQ7MTA6MTY6NDQgQU07MzszMTE5"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="A" type="Integer" array="False" size=""/>
<declare name="B" type="Integer" array="False" size=""/>
<declare name="C" type="Integer" array="False" size=""/>
<comment text="COEFFICIENTS ARE DECLARED"/>
<output expression=""ENTER THE COEFFICIENT OF 2ND DEGREE CO EFFICIENT"" newline="True"/>
<input variable="A"/>
<output expression=""ENTER THE COEFFIENT OF X"" newline="True"/>
<input variable="B"/>
<output expression=""ENTER THE CONSTANT"" newline="True"/>
<input variable="C"/>
<comment text="INPUTS ARE TAKEN"/>
<declare name="ROOT1" type="Integer" array="False" size=""/>
<comment text="root 1 is being calculated"/>
<assign variable="ROOT1" expression="(-B+(sqrt(B^2-4*A*C)))/2*A"/>
<output expression=""the root1 of thois quadratic equation is " & root1" newline="True"/>
<declare name="root2" type="Real" array="False" size=""/>
<comment text="root 2 is being caluculated"/>
<assign variable="ROOT2" expression="(-B-(sqrt(B^2-4*A*C)))/2*A"/>
<output expression=""the root2 is" & root2" newline="True"/>
<comment text="both roots are shown"/>
</body>
</function>
</flowgorithm>