aboutsummaryrefslogtreecommitdiff
path: root/prog/euclideanAlgorithmInput.html
blob: dfba476a168383bfe6e8ff918c66008521bf98ac (plain)
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
<!doctype html>
<html>
	<head>
		<script type="text/javascript" src="../lib/doml.js"></script>
		<script>
			Doml.runOnLoad();
		</script>
		<link rel="stylesheet" href="../lib/style.css">
	</head>
	<body>
		<span class="statement-sequence">
			<span class="assign" data-name="EuclideanAlgorithm">
				<span class="function" data-args="a,b">
					<span class="statement-sequence">
						<span class="while">
							<span class="compare" data-op="!=">
								<span class="variable" data-name="b"></span>
								<span class="constant" data-val="0" data-type="number"></span>
							</span>

							<span class="branch">
								<span class="compare" data-op=">">
									<span class="variable" data-name="a"></span>
									<span class="variable" data-name="b"></span>
								</span>

								<span class="assign" data-name="a">
									<span class="bin-op" data-op="-">
										<span class="variable" data-name="a"></span>
										<span class="variable" data-name="b"></span>
									</span>
								</span>

								<span class="assign" data-name="b">
									<span class="bin-op" data-op="-">
										<span class="variable" data-name="b"></span>
										<span class="variable" data-name="a"></span>
									</span>
								</span>
							</span>
						</span>

						<span class="branch">
							<span class="compare" data-op="==">
								<span class="variable" data-name="a"></span>
								<span class="constant" data-val="1" data-type="number"></span>
							</span>
							<span class="print">
								<span class="constant" data-val="Relatively prime" data-type="string"></span>
							</span>
							<span class="print">
								<span class="constant" data-val="Found GCD" data-type="string"></span>
								<span class="variable" data-name="a"></span>
							</span>
						</span>
					</span>
				</span>
			</span>

			<span class="input" data-prompt="Enter the first value" data-name="val1" data-type="number"></span>
			<span class="input" data-prompt="Enter the second value" data-name="val2" data-type="number"></span>

			<span class="call" data-name="EuclideanAlgorithm">
				<span class="variable" data-name="val1"></span>
				<span class="variable" data-name="val2"></span>
			</span>
		</span>
	</body>
</html>