-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.html
More file actions
130 lines (120 loc) · 3.79 KB
/
tests.html
File metadata and controls
130 lines (120 loc) · 3.79 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="resources/css/bootstrap.min.css">
<link rel="stylesheet" href="resources/css/default.css">
<link rel="stylesheet" href="resources/css/style.css">
<title>Algorithmes Séance 1</title>
</head>
<body>
<aside>
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#aside_navbar"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> Menu
</button>
<div class="collapse navbar-collapse" id="aside_navbar"></div>
</nav>
</aside>
<main class="container my-3">
<h1>Algorithmes séance 1</h1>
<article>
<h2></h2>
<section>
<h3></h3>
<pre><code class="algorithm">ch ← "Israa Amor Yassmine Adem"
ch1 ← ""
Pour i de 2 à Long(ch)-1 Faire
Si i = 2 ou ch[i-3] = " " Alors
ch1 ← ch1 + ch[i]
Fin Si
Fin Si
Ecrire(ch1)</code></pre>
<pre><code class="algorithm">s ← 0
Pour i de 0 à 7 Faire
Pour j de 0 à 7 Faire
Si (i+j) mod 3 = 0 Alors
s ← s + 1
Fin Si
Fin Pour
Fin Pour
Ecrire(s)</code></pre>
<pre><code class="algorithm">ch ← "Ahmed Eya"
ch1 ← "oiyeau"
ch2 ← ""
Pour i de 0 à Long(ch) - 1 Faire
Si Pos(ch[i], ch1) ≠ -1 Alors
ch2 ← ch2 + ch[i]
Fin Si
Fin Pour
Ecrire(ch2)</code></pre>
<pre><code class="algorithm">ch ← "abdoud"
ch1 ← ""
Pour i de Long(ch) - 1 à 0 Faire [pas=-1]
Si ord(ch[i]) - 97 > 10:
ch1 ← ch1 + Majus(ch[i])
Sinon
ch1 ← ch1 + ch[i]
Fin Si
Fin Pour
Ecrire(ch1)</code></pre>
<pre><code class="algorithm">a ← 5
b ← 6
c ← convch(a) + convch(b)</code></pre>
<pre><code class="algorithm">d ← "123"
e ← "abc"
f ← estnum(d) ou estnum(e)</code></pre>
<pre><code class="algorithm">g ← (valeur(d) + valeur(c)) mod 3</code></pre>
<pre><code class="algorithm">h ← ""
Pour i de 0 à 2 Faire
h ← h + chr(ord(e[i]) + valeur(d[i]))
Fin Pour</code></pre>
<pre><code class="algorithm">j ← ""
Pour i de 0 à Long(e)-1 Faore
Pour k de 1 à valeur(d[i]) Faire
j ← j + e[i]
Fin Pour
Fin Pour</code></pre>
<pre><code class="algorithm">m ← ""
Pour i de 0 à 9 Faire
Si Pos(convch(i), ch) ≠ -1 Alors
m ← convch(i) + m
Fin Si
Fin Si</code></pre>
</section>
</article>
</main>
<footer class="d-print-none bg-dark text-white p-2">
<div class="text-center">Page créée avec ♥ par Mohamed Anis MANI</div>
<div class="text-center small">Année scolaire : 2021/2022</div>
</footer>
<script src="resources/js/jquery.min.js"></script>
<script src="resources/js/bootstrap.bundle.min.js"></script>
<script src="resources/js/highlight.pack.js"></script>
<script src="resources/js/hljs.algorithm.js"></script>
<script src="resources/js/clipboard.min.js"></script>
<script src="resources/js/pages.js"></script>
<script>
hljs.initHighlightingOnLoad();
document.querySelectorAll('.language-algorithm,.language-python')
.forEach(item => {
const div = document.createElement('div');
div.className = 'bd-clipboard d-print-none';
const btn = document.createElement('button');
btn.className = 'btn-clipboard';
btn.textContent = "📋";
btn.title = "Copier";
div.appendChild(btn);
item.parentElement.insertBefore(div, item);
});
new ClipboardJS('.btn-clipboard', {
target: (trigger) => {
return trigger.parentElement.nextElementSibling;
}
});
</script>
</body>
</html>