-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunnig Code
More file actions
158 lines (158 loc) · 15.4 KB
/
Copy pathRunnig Code
File metadata and controls
158 lines (158 loc) · 15.4 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<mxfile host="app.diagrams.net" modified="2022-09-24T17:51:15.034Z" agent="5.0 (Windows)" etag="_2vrax6Xns5A1Ei-XZCA" version="20.3.6" type="github">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="1173" dy="445" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-2" value="" style="rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" target="T9wJRxxFutrIl6UK5Zcc-1" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="220" y="120" as="sourcePoint" />
<mxPoint x="220" y="170" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-4" value="Yes" style="rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.552;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="T9wJRxxFutrIl6UK5Zcc-1" target="T9wJRxxFutrIl6UK5Zcc-2" edge="1">
<mxGeometry y="20" relative="1" as="geometry">
<mxPoint as="offset" />
<mxPoint x="220" y="250" as="sourcePoint" />
<mxPoint x="220" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-8" value="No" style="rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="T9wJRxxFutrIl6UK5Zcc-3" target="WIyWlLk6GJQsqaUBKTNV-11" edge="1">
<mxGeometry x="0.3333" y="20" relative="1" as="geometry">
<mxPoint as="offset" />
<mxPoint x="220" y="530" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-11" value="Larger number detected" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="110" y="700" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-0" value="var dir = negativeorpositivenumber &gt; 0 ? 1 : -1;" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.terminator;whiteSpace=wrap;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="85" y="40" width="270" height="80" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-1" value="var min = negativeorpositivenumber &gt; 0 ? 0 : negativeorpositivenumber;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="60" y="190" width="270" height="50" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-2" value="var max = negativeorpositivenumber &gt; 0 ? negativeorpositivenumber :0;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="80" y="350" width="270" height="50" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-3" value="<div style="font-size: 11px;"><font style="font-size: 11px;">for</font></div><div style="font-size: 11px;"><font style="font-size: 11px;">(var i = 0; i &gt;= min &amp;&amp; &lt;= max; i +== dir){</font></div><div style="font-size: 11px;"><font style="font-size: 11px;"><br></font></div><font style="font-size: 11px;">}</font>" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="141" y="450" width="220" height="190" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-5" value="Yes" style="rounded=0;html=1;jettySize=auto;orthogonalLoop=1;fontSize=11;endArrow=block;endFill=0;endSize=8;strokeWidth=1;shadow=0;labelBackgroundColor=none;edgeStyle=orthogonalEdgeStyle;exitX=0.548;exitY=0.96;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="T9wJRxxFutrIl6UK5Zcc-2" target="T9wJRxxFutrIl6UK5Zcc-3">
<mxGeometry x="0.4667" y="-10" relative="1" as="geometry">
<mxPoint x="10" y="-10" as="offset" />
<mxPoint x="85" y="410" as="sourcePoint" />
<mxPoint x="109.03999999999996" y="520" as="targetPoint" />
<Array as="points">
<mxPoint x="228" y="430" />
<mxPoint x="251" y="430" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-8" value="Console.Log(i);" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.terminator;whiteSpace=wrap;fontSize=11;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="304" y="730" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.99;entryY=0.167;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="T9wJRxxFutrIl6UK5Zcc-11" target="T9wJRxxFutrIl6UK5Zcc-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1.01;entryY=0.817;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="T9wJRxxFutrIl6UK5Zcc-11" target="T9wJRxxFutrIl6UK5Zcc-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.029;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="T9wJRxxFutrIl6UK5Zcc-11" target="T9wJRxxFutrIl6UK5Zcc-16">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-11" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;fontSize=11;rotation=-180;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="414" y="740" width="30" height="40" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-16" value="<div>Prints Out <br></div><div>Result</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#d6b656;fillColor=#fff2cc;fontSize=11;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="454" y="740" width="70" height="40" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.99;entryY=0.167;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-23" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="355" y="525.02" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1.01;entryY=0.817;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-23" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="357" y="564.02" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.029;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-23" target="T9wJRxxFutrIl6UK5Zcc-24" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-23" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;fontSize=11;rotation=-180;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="366" y="525" width="30" height="40" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-24" value="<div>Create a for <br></div><div>loop that <br></div><div>continues to <br></div><div>add sum</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#d6b656;fillColor=#fff2cc;fontSize=11;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="449" y="490" width="80" height="70" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-25" value="" style="edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;rounded=0;fontSize=11;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.46;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="T9wJRxxFutrIl6UK5Zcc-3" target="T9wJRxxFutrIl6UK5Zcc-8">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="300" y="630" as="sourcePoint" />
<mxPoint x="350" y="720" as="targetPoint" />
<Array as="points">
<mxPoint x="250" y="650" />
<mxPoint x="350" y="650" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;fontSize=11;entryX=1;entryY=1;entryDx=0;entryDy=0;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-29" parent="WIyWlLk6GJQsqaUBKTNV-1" target="T9wJRxxFutrIl6UK5Zcc-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="320" y="250" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;fontSize=11;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-29" parent="WIyWlLk6GJQsqaUBKTNV-1" target="T9wJRxxFutrIl6UK5Zcc-2">
<mxGeometry relative="1" as="geometry">
<mxPoint x="374" y="370" as="targetPoint" />
<Array as="points">
<mxPoint x="374" y="375" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;fontSize=11;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-29" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="540" y="320" as="targetPoint" />
<Array as="points">
<mxPoint x="404" y="300" />
<mxPoint x="440" y="300" />
<mxPoint x="440" y="290" />
<mxPoint x="480" y="290" />
<mxPoint x="480" y="270" />
<mxPoint x="540" y="270" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-29" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;fontSize=11;rotation=-180;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="374" y="290" width="30" height="40" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-30" value="<div>Check what <br></div><div>bounds are</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#d6b656;fillColor=#fff2cc;fontSize=11;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="500" y="320" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-35" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.99;entryY=0.167;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-38" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="347.68" y="60.009999999999984" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-36" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1.01;entryY=0.817;entryDx=0;entryDy=0;entryPerimeter=0;fontSize=11;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-38" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="349.68" y="99.00999999999998" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;fontSize=11;entryX=0.025;entryY=0.475;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" source="T9wJRxxFutrIl6UK5Zcc-38" parent="WIyWlLk6GJQsqaUBKTNV-1" target="T9wJRxxFutrIl6UK5Zcc-39">
<mxGeometry relative="1" as="geometry">
<mxPoint x="450" y="80" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-38" value="" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.annotation_2;align=left;labelPosition=right;pointerEvents=1;fontSize=11;rotation=-180;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="358.68" y="59.99" width="30" height="40" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-39" value="<div>First check <br></div><div>where you <br></div><div>are going to</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#d6b656;fillColor=#fff2cc;fontSize=11;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="454" y="55" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="T9wJRxxFutrIl6UK5Zcc-41" value="In this case we want to loop in either direction" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=11;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
<mxGeometry x="290" y="5" width="240" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>